The programmer declares thread-local variables via DECLARE_TLS macro, and every thread which calls thread_init/fini at entry/exit will have its thread-local variables initialized and destroyed by their no-arg constructor and destructor.
WARNING: for now this API does not support TLS declared within a function.
WARNING: Similar to static initialization, the programmer cannot make any assumptions about the order in which two thread-local variables get initialized unless they are declared in the same file or declared using a DECLARE_TLS_SCHWARZ/DEFINE_TLS_SCHWARZ pair.
Definition at line 106 of file tls.h.
Static Public Member Functions | |
static void | global_init () |
static void | global_fini () |
static void | register_tls (void(*init)(), void(*fini)()) |
static void | thread_init () |
static void | thread_fini () |
Static Public Attributes | |
static __thread bool | _thread_initialized |