1 #ifndef __ACL_PTHREAD_INCLUDE_H__ 2 #define __ACL_PTHREAD_INCLUDE_H__ 8 #include "../stdlib/acl_define.h" 10 #define ACL_MUTEX_MAXWAIT (~(unsigned int)0) 11 #ifdef ACL_HAS_PTHREAD 29 #define acl_pthread_attr_init pthread_attr_init 30 #define acl_pthread_attr_setstacksize pthread_attr_setstacksize 31 #define acl_pthread_attr_setdetachstate pthread_attr_setdetachstate 32 #define acl_pthread_attr_destroy pthread_attr_destroy 33 #define acl_pthread_self pthread_self 34 #define acl_pthread_create pthread_create 35 #define acl_pthread_detach pthread_detach 36 #define acl_pthread_once pthread_once 37 #define acl_pthread_join pthread_join 38 #define acl_pthread_mutex_init pthread_mutex_init 39 #define acl_pthread_mutex_destroy pthread_mutex_destroy 40 #define acl_pthread_mutex_lock pthread_mutex_lock 41 #define acl_pthread_mutex_unlock pthread_mutex_unlock 42 #define acl_pthread_mutex_trylock pthread_mutex_trylock 43 #define acl_pthread_cond_init pthread_cond_init 44 #define acl_pthread_cond_destroy pthread_cond_destroy 45 #define acl_pthread_cond_signal pthread_cond_signal 46 #define acl_pthread_cond_broadcast pthread_cond_broadcast 47 #define acl_pthread_cond_timedwait pthread_cond_timedwait 48 #define acl_pthread_cond_wait pthread_cond_wait 49 #define acl_pthread_key_create pthread_key_create 50 #define acl_pthread_getspecific pthread_getspecific 51 #define acl_pthread_setspecific pthread_setspecific 53 #define ACL_PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED 54 #define ACL_PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE 55 #define ACL_TLS_OUT_OF_INDEXES 0xffffffff 56 #define ACL_PTHREAD_KEYS_MAX PTHREAD_KEYS_MAX 58 # define ACL_PTHREAD_ONCE_INIT { PTHREAD_ONCE_INIT } 60 # define ACL_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT 69 #define ACL_PTHREAD_CREATE_DETACHED 1 70 #define ACL_PTHREAD_CREATE_JOINABLE 0 71 #define ACL_TLS_OUT_OF_INDEXES 0xffffffff 72 #define ACL_PTHREAD_KEYS_MAX 1024 73 #define ACL_PTHREAD_ONCE_INIT 0 87 void *(*start_routine)(
void *);
130 void (*init_routine)(
void));
132 void (*destructor)(
void*));
155 #define acl_pthread_mutex_trylock acl_pthread_mutex_lock 161 #ifndef acl_pthread_cond_create 162 #define acl_pthread_cond_create acl_thread_cond_create 190 void (*free_fn)(
void *));
ACL_API void acl_pthread_end(void)
ACL_API int acl_pthread_cond_broadcast(acl_pthread_cond_t *cond)
ACL_API int acl_pthread_attr_destroy(acl_pthread_attr_t *thr_attr)
struct acl_pthread_condattr_t acl_pthread_condattr_t
ACL_API int acl_pthread_setspecific(acl_pthread_key_t key, void *value)
ACL_API int acl_thread_mutex_nested(acl_pthread_mutex_t *mutex)
acl_pthread_mutex_t * lock
ACL_API int acl_pthread_mutex_init(acl_pthread_mutex_t *mutex, const acl_pthread_mutexattr_t *mattr)
ACL_API int acl_pthread_attr_setdetachstate(acl_pthread_attr_t *attr, int detached)
ACL_API int acl_pthread_tls_del(acl_pthread_key_t key)
ACL_API int acl_pthread_detach(acl_pthread_t thread)
ACL_API int acl_pthread_once(acl_pthread_once_t *once_control, void(*init_routine)(void))
ACL_API int acl_pthread_cond_init(acl_pthread_cond_t *cond, acl_pthread_condattr_t *cond_attr)
ACL_API int acl_pthread_create(acl_pthread_t *thread, acl_pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
ACL_API int acl_pthread_cond_signal(acl_pthread_cond_t *cond)
struct acl_pthread_mutexattr_t acl_pthread_mutexattr_t
struct acl_pthread_mutex_t acl_pthread_mutex_t
ACL_API int acl_pthread_atexit_add(void *arg, void(*free_callback)(void *))
ACL_API int acl_pthread_mutex_unlock(acl_pthread_mutex_t *mutex)
ACL_API int acl_thread_mutex_unlock(acl_pthread_mutex_t *mutex)
ACL_API int acl_pthread_attr_setstacksize(acl_pthread_attr_t *attr, size_t stacksize)
ACL_API void acl_pthread_tls_once_set(acl_pthread_once_t control_once)
ACL_API int acl_pthread_mutex_destroy(acl_pthread_mutex_t *mutex)
ACL_API int acl_pthread_key_create(acl_pthread_key_t *key_ptr, void(*destructor)(void *))
ACL_API void acl_pthread_tls_key_set(acl_pthread_key_t key)
struct acl_pthread_attr_t acl_pthread_attr_t
ACL_API int acl_pthread_tls_set(acl_pthread_key_t key, void *ptr, void(*free_fn)(void *))
ACL_API int acl_thread_mutex_lock(acl_pthread_mutex_t *mutex)
ACL_API int acl_pthread_tls_get_max(void)
ACL_API int acl_pthread_join(acl_pthread_t thread, void **thread_return)
ACL_API int acl_pthread_cond_destroy(acl_pthread_cond_t *cond)
ACL_API void * acl_pthread_tls_get(acl_pthread_key_t *key_ptr)
ACL_API int acl_pthread_atexit_remove(void *arg, void(*free_callback)(void *))
ACL_API int acl_pthread_attr_init(acl_pthread_attr_t *attr)
ACL_API acl_pthread_key_t acl_pthread_tls_key_get(void)
ACL_API void * acl_pthread_getspecific(acl_pthread_key_t key)
ACL_API int acl_pthread_tls_set_max(int max)
struct acl_pthread_cond_t acl_pthread_cond_t
ACL_API int acl_pthread_mutex_lock(acl_pthread_mutex_t *mutex)
ACL_API int acl_pthread_cond_wait(acl_pthread_cond_t *cond, acl_pthread_mutex_t *mutex)
ACL_API void acl_pthread_tls_once_get(acl_pthread_once_t *control_once)
struct acl_pthread_t acl_pthread_t
ACL_API unsigned long acl_pthread_self(void)
ACL_API acl_pthread_cond_t * acl_thread_cond_create(void)
ACL_API int acl_pthread_cond_timedwait(acl_pthread_cond_t *cond, acl_pthread_mutex_t *mutex, const struct timespec *timeout)