aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/exec_ctx.h
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-27 09:22:38 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-27 13:41:20 -0800
commitba0689fa2a7fa5f0684d6ce0cde61f453d565ef5 (patch)
treef49643582ba1b616637af4c85d05ae9db7b68cc8 /src/core/lib/iomgr/exec_ctx.h
parenteaf67dbdf67821b76e67066f201f2fafe1f5859c (diff)
tls macro changes and UV fix
Diffstat (limited to 'src/core/lib/iomgr/exec_ctx.h')
-rw-r--r--src/core/lib/iomgr/exec_ctx.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h
index 6c310a4fd6..3a44d691b7 100644
--- a/src/core/lib/iomgr/exec_ctx.h
+++ b/src/core/lib/iomgr/exec_ctx.h
@@ -171,15 +171,15 @@ on outside context */
/** Global shutdown for ExecCtx. Called by iomgr */
static void GlobalShutdown(void) {
-#ifdef GPR_PTHREAD_TLS
+#ifdef TLS_NO_SUPPORT
gpr_tls_destroy(&exec_ctx_);
#endif
}
/** Gets pointer to current exec_ctx */
static ExecCtx* Get() {
-#ifdef GPR_PTHREAD_TLS
- return (ExecCtx*)gpr_tls_get(&exec_ctx_);
+#ifdef TLS_NO_SUPPORT
+ return reinterpret_cast<ExecCtx*>(gpr_tls_get(&exec_ctx_));
#else
return exec_ctx_;
#endif
@@ -192,8 +192,8 @@ on outside context */
private:
/** Set exec_ctx_ to exec_ctx */
void Set(ExecCtx* exec_ctx) {
-#ifdef GPR_PTHREAD_THS
- gpr_tls_set(&exec_ctx_, exec_ctx);
+#ifdef TLS_NO_SUPPORT
+ gpr_tls_set(&exec_ctx_, reinterpret_cast<intptr_t>(exec_ctx));
#else
exec_ctx_ = exec_ctx;
#endif
@@ -207,8 +207,8 @@ on outside context */
bool now_is_valid_ = false;
grpc_millis now_ = 0;
-#ifdef GPR_PTHREAD_TLS
- GPR_TLS_DECL(exec_ctx_);
+#ifdef TLS_NO_SUPPORT
+ GPR_TLS_CLASS_DECL(exec_ctx_);
#else
static thread_local ExecCtx* exec_ctx_;
#endif