|
|
@ -40,12 +40,12 @@ struct gpr_gcc_thread_local { |
|
|
|
|
|
|
|
|
|
|
|
/** Use GPR_TLS_CLASS_DECL to declare tls static variable members of a class.
|
|
|
|
/** Use GPR_TLS_CLASS_DECL to declare tls static variable members of a class.
|
|
|
|
* GPR_TLS_CLASS_DEF needs to be called to define this member. */ |
|
|
|
* GPR_TLS_CLASS_DEF needs to be called to define this member. */ |
|
|
|
#define GPR_TLS_CLASS_DECL(name) \ |
|
|
|
#define GPR_TLS_CLASS_DECL(name) \ |
|
|
|
static bool name##_inited; \
|
|
|
|
static bool name##_inited; \
|
|
|
|
static __thread struct gpr_gcc_thread_local name |
|
|
|
static __thread struct gpr_gcc_thread_local name |
|
|
|
|
|
|
|
|
|
|
|
#define GPR_TLS_CLASS_DEF(name) \ |
|
|
|
#define GPR_TLS_CLASS_DEF(name) \ |
|
|
|
bool name##_inited = false; \
|
|
|
|
bool name##_inited = false; \
|
|
|
|
__thread struct gpr_gcc_thread_local name = {0, &(name##_inited)} |
|
|
|
__thread struct gpr_gcc_thread_local name = {0, &(name##_inited)} |
|
|
|
|
|
|
|
|
|
|
|
#define gpr_tls_init(tls) \ |
|
|
|
#define gpr_tls_init(tls) \ |
|
|
|