Implement pthread_cond_broadcast wrapper for lib-pthread (#982)
Implement pthread_cond_broadcast wrapper for lib-pthread - support pthread_cond_broadcast wrapper for posix/linux-sgx/windows - update document for building multi-thread wasm app with emcc
This commit is contained in:
@ -19,48 +19,70 @@ typedef unsigned int pthread_cond_t;
|
||||
typedef unsigned int pthread_key_t;
|
||||
|
||||
/* Thread APIs */
|
||||
int pthread_create(pthread_t *thread, const void *attr,
|
||||
void *(*start_routine) (void *), void *arg);
|
||||
int
|
||||
pthread_create(pthread_t *thread, const void *attr,
|
||||
void *(*start_routine)(void *), void *arg);
|
||||
|
||||
int pthread_join(pthread_t thread, void **retval);
|
||||
int
|
||||
pthread_join(pthread_t thread, void **retval);
|
||||
|
||||
int pthread_detach(pthread_t thread);
|
||||
int
|
||||
pthread_detach(pthread_t thread);
|
||||
|
||||
int pthread_cancel(pthread_t thread);
|
||||
int
|
||||
pthread_cancel(pthread_t thread);
|
||||
|
||||
pthread_t pthread_self(void);
|
||||
pthread_t
|
||||
pthread_self(void);
|
||||
|
||||
void pthread_exit(void *retval);
|
||||
void
|
||||
pthread_exit(void *retval);
|
||||
|
||||
/* Mutex APIs */
|
||||
int pthread_mutex_init(pthread_mutex_t *mutex, const void *attr);
|
||||
int
|
||||
pthread_mutex_init(pthread_mutex_t *mutex, const void *attr);
|
||||
|
||||
int pthread_mutex_lock(pthread_mutex_t *mutex);
|
||||
int
|
||||
pthread_mutex_lock(pthread_mutex_t *mutex);
|
||||
|
||||
int pthread_mutex_unlock(pthread_mutex_t *mutex);
|
||||
int
|
||||
pthread_mutex_unlock(pthread_mutex_t *mutex);
|
||||
|
||||
int pthread_mutex_destroy(pthread_mutex_t *mutex);
|
||||
int
|
||||
pthread_mutex_destroy(pthread_mutex_t *mutex);
|
||||
|
||||
/* Cond APIs */
|
||||
int pthread_cond_init(pthread_cond_t *cond, const void *attr);
|
||||
int
|
||||
pthread_cond_init(pthread_cond_t *cond, const void *attr);
|
||||
|
||||
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
|
||||
int
|
||||
pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
|
||||
|
||||
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||
uint64_t useconds);
|
||||
int
|
||||
pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||
uint64_t useconds);
|
||||
|
||||
int pthread_cond_signal(pthread_cond_t *cond);
|
||||
int
|
||||
pthread_cond_signal(pthread_cond_t *cond);
|
||||
|
||||
int pthread_cond_destroy(pthread_cond_t *cond);
|
||||
int
|
||||
pthread_cond_broadcast(pthread_cond_t *cond);
|
||||
|
||||
int
|
||||
pthread_cond_destroy(pthread_cond_t *cond);
|
||||
|
||||
/* Pthread key APIs */
|
||||
int pthread_key_create(pthread_key_t *key, void (*destructor)(void *));
|
||||
int
|
||||
pthread_key_create(pthread_key_t *key, void (*destructor)(void *));
|
||||
|
||||
int pthread_setspecific(pthread_key_t key, const void *value);
|
||||
int
|
||||
pthread_setspecific(pthread_key_t key, const void *value);
|
||||
|
||||
void *pthread_getspecific(pthread_key_t key);
|
||||
void *
|
||||
pthread_getspecific(pthread_key_t key);
|
||||
|
||||
int pthread_key_delete(pthread_key_t key);
|
||||
int
|
||||
pthread_key_delete(pthread_key_t key);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user