19 #ifndef GRPC_CORE_LIB_GPR_TLS_PTHREAD_H 20 #define GRPC_CORE_LIB_GPR_TLS_PTHREAD_H 35 #define GPR_TLS_DECL(name) static struct gpr_pthread_thread_local name = {0} 39 #define GPR_TLS_CLASS_DECL(name) static struct gpr_pthread_thread_local name 43 #define GPR_TLS_CLASS_DEF(name) struct gpr_pthread_thread_local name = {0} 45 #define gpr_tls_init(tls) GPR_ASSERT(0 == pthread_key_create(&(tls)->key, NULL)) 46 #define gpr_tls_destroy(tls) pthread_key_delete((tls)->key) 47 #define gpr_tls_get(tls) ((intptr_t)pthread_getspecific((tls)->key)) Thread local storage based on pthread library calls.
Definition: tls_pthread.h:30
pthread_key_t key
Definition: tls_pthread.h:31
intptr_t gpr_tls_set(struct gpr_pthread_thread_local *tls, intptr_t value)