GNU libmicrohttpd 1.0.0
Loading...
Searching...
No Matches
mhd_threads.c File Reference

Implementation for thread functions. More...

#include "mhd_threads.h"
#include <errno.h>
#include "mhd_assert.h"
Include dependency graph for mhd_threads.c:

Go to the source code of this file.

Macros

#define MHD_set_thread_name_(t, n)   (void)
 
#define MHD_set_cur_thread_name_(n)   (void)
 

Functions

int MHD_create_thread_ (MHD_thread_handle_ID_ *handle_id, size_t stack_size, MHD_THREAD_START_ROUTINE_ start_routine, void *arg)
 

Detailed Description

Implementation for thread functions.

Author
Karlson2k (Evgeny Grin)

Definition in file mhd_threads.c.

Macro Definition Documentation

◆ MHD_set_cur_thread_name_

#define MHD_set_cur_thread_name_ ( n)    (void)

Definition at line 47 of file mhd_threads.c.

◆ MHD_set_thread_name_

#define MHD_set_thread_name_ ( t,
n )   (void)

Definition at line 46 of file mhd_threads.c.

Function Documentation

◆ MHD_create_thread_()

int MHD_create_thread_ ( MHD_thread_handle_ID_ * handle_id,
size_t stack_size,
MHD_THREAD_START_ROUTINE_ start_routine,
void * arg )

Create a thread and set the attributes according to our options.

If thread is created, thread handle must be freed by MHD_join_thread_().

Parameters
handle_idhandle to initialise
stack_sizesize of stack for new thread, 0 for default
start_routinemain function of thread
argargument for start_routine
Returns
non-zero on success; zero otherwise (with errno set)

Definition at line 187 of file mhd_threads.c.

References mhd_assert, MHD_thread_handle_ID_is_valid_handle_, MHD_thread_handle_ID_set_invalid_, MHD_thread_handle_ID_set_native_handle_, NULL, and UINT_MAX.