YAZ
5.34.0
|
Implements thread creation wrappers. More...
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stddef.h>
#include <yaz/xmalloc.h>
#include <yaz/log.h>
#include <yaz/thread_create.h>
Go to the source code of this file.
Data Structures | |
struct | yaz_thread |
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... | |
Implements thread creation wrappers.
Definition in file thread_create.c.
yaz_thread_t yaz_thread_create | ( | void *(*)(void *p) | start_routine, |
void * | arg | ||
) |
create thread
start_routine | thread handler |
arg | user data to be passed to handler |
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
tp | thread_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
tp | thread_id reference .. Will be 0 upon completion |
value_ptr | ref 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().