aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-28 13:23:36 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-28 13:23:36 -0800
commit81fc8c9c336fab7a71b448f748a32d680301277c (patch)
tree5cd64fd191db0f87d59ef53768c1b6760b4f1654 /include
parent3285f4c7329bf4305133be74f88dd4b10d5e2052 (diff)
Fix tests to call grpc_init and grpc_shutdown before using exec_ctx
Diffstat (limited to 'include')
-rw-r--r--include/grpc/impl/codegen/port_platform.h2
-rw-r--r--include/grpc/support/tls.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
index de27a53e26..1a93be38e0 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -182,7 +182,7 @@
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
-#define TLS_NO_SUPPORT 1
+#define TLS_NO_SUPPORT 1 /* thread-local storage not supported. Use GPR_TLS */
#if TARGET_OS_IPHONE
#define GPR_PLATFORM_STRING "ios"
#define GPR_CPU_IPHONE 1
diff --git a/include/grpc/support/tls.h b/include/grpc/support/tls.h
index 8519a8350b..4c9e79b6cf 100644
--- a/include/grpc/support/tls.h
+++ b/include/grpc/support/tls.h
@@ -32,6 +32,12 @@
GPR_TLS_DECL(foo);
Thread locals always have static scope.
+ Declaring a thread local class variable 'foo':
+ GPR_TLS_CLASS_DECL(foo);
+
+ Defining the thread local class variable:
+ GPR_TLS_CLASS_DEF(foo);
+
Initializing a thread local (must be done at library initialization
time):
gpr_tls_init(&foo);