YAZ  5.23.1
Typedefs | Functions
thread_create.h File Reference

Implements thread creation wrappers. More...

#include <stddef.h>
#include <time.h>
#include <yaz/yconfig.h>

Go to the source code of this file.

Typedefs

typedef struct yaz_threadyaz_thread_t
 Thread Identifier opaque pointer. More...
 

Functions

yaz_thread_t yaz_thread_create (void *(*start_routine)(void *p), void *arg)
 create thread More...
 
void yaz_thread_join (yaz_thread_t *tp, void **value_ptr)
 join thread More...
 
void yaz_thread_detach (yaz_thread_t *tp)
 detach thread More...
 

Detailed Description

Implements thread creation wrappers.

Definition in file thread_create.h.

Typedef Documentation

typedef struct yaz_thread* yaz_thread_t

Thread Identifier opaque pointer.

Definition at line 42 of file thread_create.h.

Function Documentation

yaz_thread_t yaz_thread_create ( void *(*)(void *p)  start_routine,
void *  arg 
)

create thread

Parameters
start_routinethread handler
arguser data to be passed to handler
Returns
thread_id identifier if successful; NULL on failure

Definition at line 55 of file thread_create.c.

References yaz_thread::data, xfree, and xmalloc.

Referenced by tcpip_straddr().

void yaz_thread_detach ( yaz_thread_t tp)

detach thread

Parameters
tpthread_id reference .. Will be 0 upon completion

Definition at line 105 of file thread_create.c.

References xfree.

void yaz_thread_join ( yaz_thread_t tp,
void **  value_ptr 
)

join thread

Parameters
tpthread_id reference .. Will be 0 upon completion
value_ptrref pointer to routine result (0 if not needed)

Definition at line 86 of file thread_create.c.

References xfree.

Referenced by tcpip_close(), and wait_resolver_thread().