diff options
author | 2017-11-28 18:06:23 -0800 | |
---|---|---|
committer | 2017-11-28 18:06:23 -0800 | |
commit | 03412ee9de902e378bc4cea933397ebe5faddc29 (patch) | |
tree | 8976a958d4c9855481425452e578ab4a4e315ad0 /src/core/lib/iomgr/exec_ctx.h | |
parent | 81fc8c9c336fab7a71b448f748a32d680301277c (diff) |
Remove TLS_NO_SUPPORT and always use GPR_TLS. Reorder statements in grpc_init and grpc_shutdown. Add grpc_init and grpc_shutdown in failing test/cpp tests
Diffstat (limited to 'src/core/lib/iomgr/exec_ctx.h')
-rw-r--r-- | src/core/lib/iomgr/exec_ctx.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index b04aab61fa..c8700f3352 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -170,19 +170,11 @@ on outside context */ static void GlobalInit(void); /** Global shutdown for ExecCtx. Called by iomgr */ - static void GlobalShutdown(void) { -#ifdef TLS_NO_SUPPORT - gpr_tls_destroy(&exec_ctx_); -#endif - } + static void GlobalShutdown(void) { gpr_tls_destroy(&exec_ctx_); } /** Gets pointer to current exec_ctx */ static ExecCtx* Get() { -#ifdef TLS_NO_SUPPORT return reinterpret_cast<ExecCtx*>(gpr_tls_get(&exec_ctx_)); -#else - return exec_ctx_; -#endif } protected: @@ -192,11 +184,7 @@ on outside context */ private: /** Set exec_ctx_ to exec_ctx */ void Set(ExecCtx* exec_ctx) { -#ifdef TLS_NO_SUPPORT gpr_tls_set(&exec_ctx_, reinterpret_cast<intptr_t>(exec_ctx)); -#else - exec_ctx_ = exec_ctx; -#endif } grpc_closure_list closure_list_ = GRPC_CLOSURE_LIST_INIT; @@ -207,11 +195,7 @@ on outside context */ bool now_is_valid_ = false; grpc_millis now_ = 0; -#ifdef TLS_NO_SUPPORT GPR_TLS_CLASS_DECL(exec_ctx_); -#else - static thread_local ExecCtx* exec_ctx_; -#endif ExecCtx* last_exec_ctx_ = Get(); }; } // namespace grpc_core |