|
Zero
0.1.0
|
Wrapper for a type, used by TLS_STRUCT helper macro. More...
#include <tls.h>
Public Types | |
| enum | { MAX_BYTES_NEEDED = sizeof(T) + sizeof(long) - 1, ARRAY_SIZE = MAX_BYTES_NEEDED / sizeof(long) } |
Public Member Functions | |
| void | init () |
| void | fini () |
| T * | get () |
| Used by fini() and init() and directly by macros. More... | |
Public Attributes | |
| long | _reserved_space [ARRAY_SIZE] |
Wrapper for a type, used by TLS_STRUCT helper macro.
All thread-local variables declared by TLS_STRUCT are actually just a bunch of bytes... until init() and fini() are called, that is. After that the tls_blob acts like a smart pointer.
|
inline |
Call T's destructor
|
inline |
|
inline |
Placement new, using _reserved_space, to make the type T's constructor get called.
| long tls_tricks::tls_blob< T >::_reserved_space[ARRAY_SIZE] |
1.8.12