ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
threads.h File Reference
#include <pthread.h>
#include <time.h>
Include dependency graph for threads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define thread_local   _Thread_local
#define TSS_DTOR_ITERATIONS   4
#define ONCE_FLAG_INIT   0

Typedefs

typedef pthread_t thrd_t
typedef pthread_mutex_t mtx_t
typedef pthread_cond_t cnd_t
typedef pthread_key_t tss_t
typedef int(* thrd_start_t) (void *)
typedef void(* tss_dtor_t) (void *)
typedef int once_flag

Enumerations

enum  { mtx_plain = 0 , mtx_recursive = 1 , mtx_timed = 2 }
enum  {
  thrd_success = 0 , thrd_busy = 1 , thrd_error = 2 , thrd_nomem = 3 ,
  thrd_timedout = 4
}

Functions

int thrd_create (thrd_t *, thrd_start_t, void *)
int thrd_equal (thrd_t, thrd_t)
thrd_t thrd_current (void)
int thrd_sleep (const struct timespec *, struct timespec *)
void thrd_yield (void)
_Noreturn void thrd_exit (int)
int thrd_detach (thrd_t)
int thrd_join (thrd_t, int *)
int mtx_init (mtx_t *, int)
int mtx_lock (mtx_t *)
int mtx_timedlock (mtx_t *__restrict, const struct timespec *__restrict)
int mtx_trylock (mtx_t *)
int mtx_unlock (mtx_t *)
void mtx_destroy (mtx_t *)
void call_once (once_flag *, void(*)(void))
int cnd_init (cnd_t *)
int cnd_signal (cnd_t *)
int cnd_broadcast (cnd_t *)
int cnd_wait (cnd_t *, mtx_t *)
int cnd_timedwait (cnd_t *__restrict, mtx_t *__restrict, const struct timespec *__restrict)
void cnd_destroy (cnd_t *)
int tss_create (tss_t *, tss_dtor_t)
void * tss_get (tss_t)
int tss_set (tss_t, void *)
void tss_delete (tss_t)

Macro Definition Documentation

◆ ONCE_FLAG_INIT

#define ONCE_FLAG_INIT   0

◆ thread_local

#define thread_local   _Thread_local

◆ TSS_DTOR_ITERATIONS

#define TSS_DTOR_ITERATIONS   4

Typedef Documentation

◆ cnd_t

◆ mtx_t

◆ once_flag

typedef int once_flag

◆ thrd_start_t

typedef int(* thrd_start_t) (void *)

◆ thrd_t

typedef pthread_t thrd_t

◆ tss_dtor_t

typedef void(* tss_dtor_t) (void *)

◆ tss_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
thrd_success 
thrd_busy 
thrd_error 
thrd_nomem 
thrd_timedout 

◆ anonymous enum

anonymous enum
Enumerator
mtx_plain 
mtx_recursive 
mtx_timed 

Function Documentation

◆ call_once()

void call_once ( once_flag * flag,
void(* func )(void) )

◆ cnd_broadcast()

int cnd_broadcast ( cnd_t * cond)

◆ cnd_destroy()

void cnd_destroy ( cnd_t * cond)

◆ cnd_init()

int cnd_init ( cnd_t * cond)

◆ cnd_signal()

int cnd_signal ( cnd_t * cond)

◆ cnd_timedwait()

int cnd_timedwait ( cnd_t * __restrict,
mtx_t * __restrict,
const struct timespec * __restrict )

◆ cnd_wait()

int cnd_wait ( cnd_t * cond,
mtx_t * mtx )

◆ mtx_destroy()

void mtx_destroy ( mtx_t * mtx)

◆ mtx_init()

int mtx_init ( mtx_t * mtx,
int type )

◆ mtx_lock()

int mtx_lock ( mtx_t * mtx)

◆ mtx_timedlock()

int mtx_timedlock ( mtx_t * __restrict,
const struct timespec * __restrict )

◆ mtx_trylock()

int mtx_trylock ( mtx_t * mtx)

◆ mtx_unlock()

int mtx_unlock ( mtx_t * mtx)

◆ thrd_create()

int thrd_create ( thrd_t * thr,
thrd_start_t func,
void * arg )

◆ thrd_current()

thrd_t thrd_current ( void )

◆ thrd_detach()

int thrd_detach ( thrd_t thr)

◆ thrd_equal()

int thrd_equal ( thrd_t a,
thrd_t b )

◆ thrd_exit()

_Noreturn void thrd_exit ( int res)

◆ thrd_join()

int thrd_join ( thrd_t thr,
int * res )

◆ thrd_sleep()

int thrd_sleep ( const struct timespec * duration,
struct timespec * remaining )

◆ thrd_yield()

void thrd_yield ( void )

◆ tss_create()

int tss_create ( tss_t * key,
tss_dtor_t dtor )

◆ tss_delete()

void tss_delete ( tss_t key)

◆ tss_get()

void * tss_get ( tss_t key)

◆ tss_set()

int tss_set ( tss_t key,
void * val )