|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
C11 Threading API. More...
#include <sys/cdefs.h>#include <time.h>#include <kos/thread.h>#include <kos/once.h>#include <kos/mutex.h>#include <kos/cond.h>#include <kos/tls.h>Go to the source code of this file.
Macros | |
| #define | ONCE_FLAG_INIT KTHREAD_ONCE_INIT |
| Macro to initialize a once_flag object. | |
| #define | TSS_DTOR_ITERATIONS 1 |
| Maximum number of iterations over TSS destructors. | |
Typedefs | |
| typedef kthread_once_t | once_flag |
| Object type backing call_once. | |
| typedef mutex_t | mtx_t |
| C11 mutual exclusion lock type. | |
| typedef condvar_t | cnd_t |
| C11 condition variable type. | |
| typedef kthread_t * | thrd_t |
| C11 thread identifier type. | |
| typedef kthread_key_t | tss_t |
| C11 thread-specific storage type. | |
C11 Threading API.
This file contains the platform-specific definitions needed for using C11 threads. The C11 standard defines a number of threading-related primitives, which we wrap neatly around KOS' built-in threading support here.
If you compile your code with a strict standard set (you use a -std= flag with GCC that doesn't start with gnu), you must use -std=c11 to use this functionality. If you don't pass a -std= flag to GCC, then you're probably fine.