ooc
1.3c
Object Oriented tollkit fo ANSI C
|
Multithreading support. More...
Macros | |
#define | TLS |
Thread Local Storage. More... | |
#define | ooc_Mutex |
Mutex. Allocates a mutex. More... | |
#define | ooc_mutex_init(x) |
Initializes the mutex. More... | |
#define | ooc_mutex_release(x) |
Releases the mutex. More... | |
#define | ooc_lock(x) |
Locks the mutex. More... | |
#define | ooc_unlock(x) |
Unlocks the mutex. More... | |
#define | ooc_try_lock(x) |
Tries to lock the mutex. More... | |
Multithreading support.
Multithreading primitives that can be used writing ooc core and ooc extensions (e.g. new containers, etc.) Don't use these in your own code! Use the platform native threading or some generalized one (e.g. OpenMP) instead.
#define ooc_lock | ( | x | ) |
Locks the mutex.
Mutex must be initialized already!
x | The mutex to be locked. |
#define ooc_mutex_init | ( | x | ) |
Initializes the mutex.
Mutexes must be initialized before use.
x | The mutex to be initialized. |
#define ooc_mutex_release | ( | x | ) |
Releases the mutex.
Mutexes must be released after use.
Releasing a mutex locked by an other thread is an error, the behavior is implementation dependent.
x | The mutex to be released. |
#define ooc_try_lock | ( | x | ) |
Tries to lock the mutex.
Mutex must be initialized already!
x | The mutex to be locked. |
#define ooc_unlock | ( | x | ) |
Unlocks the mutex.
Mutex must be initialized already and must be locked by the thread!
x | The mutex to be unlocked. |
#define TLS |
Thread Local Storage.
Must be defined as a static or global variable. This is a type qualifier, binds left to right.