13#ifndef __ESBMC_THREADS_H
14#define __ESBMC_THREADS_H
19#define thread_local _Thread_local
22#define TSS_DTOR_ITERATIONS 4
33#define ONCE_FLAG_INIT 0
unsigned long int pthread_t
Definition pthread.h:41
unsigned int pthread_key_t
Definition pthread.h:91
int tss_create(tss_t *, tss_dtor_t)
Definition threads_lib.c:189
pthread_key_t tss_t
Definition threads.h:27
int cnd_init(cnd_t *)
Definition threads_lib.c:147
int(* thrd_start_t)(void *)
Definition threads.h:29
int once_flag
Definition threads.h:32
int thrd_join(thrd_t, int *)
Definition threads_lib.c:75
int cnd_broadcast(cnd_t *)
Definition threads_lib.c:159
pthread_t thrd_t
Definition threads.h:24
@ mtx_timed
Definition threads.h:39
@ mtx_plain
Definition threads.h:37
@ mtx_recursive
Definition threads.h:38
_Noreturn void thrd_exit(int)
Definition threads_lib.c:63
@ thrd_timedout
Definition threads.h:48
@ thrd_success
Definition threads.h:44
@ thrd_busy
Definition threads.h:45
@ thrd_nomem
Definition threads.h:47
@ thrd_error
Definition threads.h:46
void tss_delete(tss_t)
Definition threads_lib.c:207
int thrd_sleep(const struct timespec *, struct timespec *)
Definition threads_lib.c:45
int mtx_init(mtx_t *, int)
Definition threads_lib.c:88
int thrd_equal(thrd_t, thrd_t)
Definition threads_lib.c:33
int cnd_wait(cnd_t *, mtx_t *)
Definition threads_lib.c:165
int mtx_lock(mtx_t *)
Definition threads_lib.c:104
void cnd_destroy(cnd_t *)
Definition threads_lib.c:183
void call_once(once_flag *, void(*)(void))
Definition threads_lib.c:141
int mtx_trylock(mtx_t *)
Definition threads_lib.c:119
void * tss_get(tss_t)
Definition threads_lib.c:195
void mtx_destroy(mtx_t *)
Definition threads_lib.c:135
int thrd_detach(thrd_t)
Definition threads_lib.c:69
pthread_cond_t cnd_t
Definition threads.h:26
int thrd_create(thrd_t *, thrd_start_t, void *)
Definition threads_lib.c:19
int tss_set(tss_t, void *)
Definition threads_lib.c:201
thrd_t thrd_current(void)
Definition threads_lib.c:39
int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict, const struct timespec *__restrict)
void thrd_yield(void)
Definition threads_lib.c:57
int cnd_signal(cnd_t *)
Definition threads_lib.c:153
int mtx_unlock(mtx_t *)
Definition threads_lib.c:129
pthread_mutex_t mtx_t
Definition threads.h:25
int mtx_timedlock(mtx_t *__restrict, const struct timespec *__restrict)
void(* tss_dtor_t)(void *)
Definition threads.h:30