GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
mhd_threads.h File Reference
#include "mhd_options.h"
#include <stdlib.h>
Include dependency graph for mhd_threads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MHD_create_named_thread_(t, n, s, r, a)   MHD_create_thread_ ((t),(s),(r),(a))
 

Typedefs

typedef MHD_THRD_RTRN_TYPE_(MHD_THRD_CALL_SPEC_ * MHD_THREAD_START_ROUTINE_) (void *cls)
 

Functions

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

Macro Definition Documentation

◆ MHD_create_named_thread_

#define MHD_create_named_thread_ (   t,
  n,
  s,
  r,
 
)    MHD_create_thread_ ((t),(s),(r),(a))

Definition at line 216 of file mhd_threads.h.

Typedef Documentation

◆ MHD_THREAD_START_ROUTINE_

typedef MHD_THRD_RTRN_TYPE_(MHD_THRD_CALL_SPEC_ * MHD_THREAD_START_ROUTINE_) (void *cls)

Signature of main function for a thread.

Parameters
clsclosure argument for the function
Returns
termination code from the thread

Definition at line 194 of file mhd_threads.h.

Function Documentation

◆ MHD_create_thread_()

int MHD_create_thread_ ( MHD_thread_handle_ID_ *  thread,
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
threadhandle to initialize
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

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

Parameters
threadhandle to initialize
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 180 of file mhd_threads.c.