|
rlib
Convenience library for useful things
|
Thread-specific storage slot. More...
#include <rlib/concurrency/rthreads.h>
Data Fields | ||
| RDestroyNotify | notify | |
| union { | ||
| rpointer ptr | ||
| raptr aptr | ||
| ruint ui | ||
| ruint8 u8 | ||
| ruint16 u16 | ||
| ruint32 u32 | ||
| ruint64 u64 | ||
| ruint8 data [sizeof(rpointer) *4] | ||
| } | impl | |
Thread-specific storage slot.
Each thread sees its own value; r_tss_get and r_tss_set read and write the calling thread's slot. The inline union lets the slot hold a pointer, an atomic pointer, or up to 4 pointer widths of inline bytes without a separate heap allocation.
Declare with R_TSS_INIT at file scope.
| RDestroyNotify RTss::notify |
Destructor for the stored value, or NULL.