P99
Data Structures | Macros | Typedefs | Functions
p99_threads.h File Reference
#include "p99_try.h"
#include "p99_tss.h"
+ Include dependency graph for p99_threads.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  p99_once_flag
 complete object type that holds a flag for use by p99_call_once More...
 

Macros

#define call_once   p99_call_once
 
#define ONCE_FLAG_INIT   P99_ONCE_FLAG_INIT
 
#define p99_call_once(FLAG, FUNC, ARG)
 Call a function FUNC exactly once, optionally providing it with argument ARG. More...
 
#define P99_DECLARE_INIT_ONCE(T, NAME, ARG)
 
#define P99_DECLARE_ONCE_CHAIN(T)   extern p99_once_flag P99_PASTE3(p99_, T, _once)
 Declare the symbols that are needed for the macro P99_INIT_CHAIN(). More...
 
#define P99_DEFINE_ONCE_CHAIN(T, ...)
 Define a function that will be called exactly once by P99_INIT_CHAIN(T). More...
 
#define P99_INIT_CHAIN(T)   p99_call_once(&P99_PASTE3(p99_, T, _once), P99_PASTE3(p99_, T, _once).p00_init)
 Ensure that the function that was defined with P99_DEFINE_ONCE_CHAIN has been called exactly once before proceeding. More...
 
#define P99_INIT_ONCE(NAME, VARP)   P99_PASTE3(p00_, NAME, _init_once)(VARP)
 
#define P99_MUTUAL_EXCLUDE(MUT)   P00_MUTUAL_EXCLUDE(MUT, P99_UNIQ(mut))
 Protect the following block or statement with mtx_t MUT. More...
 
#define THRD2STR(ID)   thrd2str((char[1 + sizeof(thrd_t) * 2]){0}, (ID))
 

Typedefs

typedef struct p99_once_flag once_flag
 
typedef struct p99_once_flag p99_once_flag
 

Functions

char const * thrd2str (char *p00_buf, thrd_t p00_id)
 
void thrd_t_destroy (thrd_t *p00_id)
 
thrd_t * thrd_t_init (thrd_t *p00_id)
 
p99_once_flag
complete object type that holds a flag for use by p99_call_once
Definition: p99_threads.h:62
P99_PASTE3
#define P99_PASTE3(_1, _2, _3)
Definition: p99_paste.h:83
P99_UNLIKELY
#define P99_UNLIKELY(...)
Mark the conditional expression as being unlikely.
Definition: p99_compiler.h:994
P99_DEFINE_ONCE_CHAIN
#define P99_DEFINE_ONCE_CHAIN(T,...)
Define a function that will be called exactly once by P99_INIT_CHAIN(T).
Definition: p99_threads.h:237