GRPC Core  1.0.0
Data Structures | Macros
tls_gcc.h File Reference
#include <stdbool.h>
#include <grpc/support/log.h>

Go to the source code of this file.

Data Structures

struct  gpr_gcc_thread_local
 

Macros

#define GPR_TLS_DECL(name)
 
#define gpr_tls_init(tls)
 
#define gpr_tls_destroy(tls)
 
#define gpr_tls_set(tls, new_value)
 
#define gpr_tls_get(tls)
 

Macro Definition Documentation

#define GPR_TLS_DECL (   name)
Value:
static bool name##_inited = false; \
static __thread struct gpr_gcc_thread_local name = {0, &(name##_inited)}
Definition: tls_gcc.h:46
#define gpr_tls_destroy (   tls)
Value:
do { \
GPR_ASSERT(*((tls)->inited)); \
*((tls)->inited) = false; \
} while (0)
bool * inited
Definition: tls_gcc.h:48
#define GPR_ASSERT(x)
Definition: log.h:106
#define gpr_tls_get (   tls)
Value:
({ \
GPR_ASSERT(*((tls)->inited)); \
(tls)->value; \
})
bool * inited
Definition: tls_gcc.h:48
#define GPR_ASSERT(x)
Definition: log.h:106
intptr_t value
Definition: tls_gcc.h:47
#define gpr_tls_init (   tls)
Value:
do { \
GPR_ASSERT(*((tls)->inited) == false); \
*((tls)->inited) = true; \
} while (0)
bool * inited
Definition: tls_gcc.h:48
#define GPR_ASSERT(x)
Definition: log.h:106
#define gpr_tls_set (   tls,
  new_value 
)
Value:
do { \
GPR_ASSERT(*((tls)->inited)); \
(tls)->value = (new_value); \
} while (0)
bool * inited
Definition: tls_gcc.h:48
#define GPR_ASSERT(x)
Definition: log.h:106
intptr_t value
Definition: tls_gcc.h:47