aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/support/tls_gcc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpc/support/tls_gcc.h')
-rw-r--r--include/grpc/support/tls_gcc.h40
1 files changed, 0 insertions, 40 deletions
diff --git a/include/grpc/support/tls_gcc.h b/include/grpc/support/tls_gcc.h
index 019acdf122..1b91d22be1 100644
--- a/include/grpc/support/tls_gcc.h
+++ b/include/grpc/support/tls_gcc.h
@@ -26,44 +26,6 @@
/** Thread local storage based on gcc compiler primitives.
#include tls.h to use this - and see that file for documentation */
-#ifndef NDEBUG
-
-struct gpr_gcc_thread_local {
- intptr_t value;
- bool* inited;
-};
-
-#define GPR_TLS_DECL(name) \
- static bool name##_inited = false; \
- static __thread struct gpr_gcc_thread_local name = {0, &(name##_inited)}
-
-#define gpr_tls_init(tls) \
- do { \
- GPR_ASSERT(*((tls)->inited) == false); \
- *((tls)->inited) = true; \
- } while (0)
-
-/** It is allowed to call gpr_tls_init after gpr_tls_destroy is called. */
-#define gpr_tls_destroy(tls) \
- do { \
- GPR_ASSERT(*((tls)->inited)); \
- *((tls)->inited) = false; \
- } while (0)
-
-#define gpr_tls_set(tls, new_value) \
- do { \
- GPR_ASSERT(*((tls)->inited)); \
- (tls)->value = (new_value); \
- } while (0)
-
-#define gpr_tls_get(tls) \
- ({ \
- GPR_ASSERT(*((tls)->inited)); \
- (tls)->value; \
- })
-
-#else /* NDEBUG */
-
struct gpr_gcc_thread_local {
intptr_t value;
};
@@ -80,6 +42,4 @@ struct gpr_gcc_thread_local {
#define gpr_tls_set(tls, new_value) (((tls)->value) = (new_value))
#define gpr_tls_get(tls) ((tls)->value)
-#endif /* NDEBUG */
-
#endif /* GRPC_SUPPORT_TLS_GCC_H */