diff options
author | 2017-11-22 16:03:32 -0800 | |
---|---|---|
committer | 2017-11-22 16:59:56 -0800 | |
commit | eaf67dbdf67821b76e67066f201f2fafe1f5859c (patch) | |
tree | 5332cad696c25e36868f437b4e1c357c25a550de /src/core/lib/iomgr/exec_ctx.h | |
parent | a13a8c0f3ea9bdf70680c0c8b5667186c832a412 (diff) |
Fixing errors and minor bugs
Diffstat (limited to 'src/core/lib/iomgr/exec_ctx.h')
-rw-r--r-- | src/core/lib/iomgr/exec_ctx.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 6320e13acb..6c310a4fd6 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -47,6 +47,12 @@ typedef struct grpc_combiner grpc_combiner; should be given to not delete said call/channel from this exec_ctx */ #define GRPC_EXEC_CTX_FLAG_THREAD_RESOURCE_LOOP 2 +extern grpc_closure_scheduler* grpc_schedule_on_exec_ctx; + +gpr_timespec grpc_millis_to_timespec(grpc_millis millis, gpr_clock_type clock); +grpc_millis grpc_timespec_to_millis_round_down(gpr_timespec timespec); +grpc_millis grpc_timespec_to_millis_round_up(gpr_timespec timespec); + namespace grpc_core { /** Execution context. * A bag of data that collects information along a callstack. @@ -164,7 +170,11 @@ on outside context */ static void GlobalInit(void); /** Global shutdown for ExecCtx. Called by iomgr */ - static void GlobalShutdown(void); + static void GlobalShutdown(void) { +#ifdef GPR_PTHREAD_TLS + gpr_tls_destroy(&exec_ctx_); +#endif + } /** Gets pointer to current exec_ctx */ static ExecCtx* Get() { @@ -206,14 +216,6 @@ on outside context */ }; } // namespace grpc_core -extern grpc_closure_scheduler* grpc_schedule_on_exec_ctx; - -gpr_timespec grpc_millis_to_timespec(grpc_millis millis, gpr_clock_type clock); -grpc_millis grpc_timespec_to_millis_round_down(gpr_timespec timespec); -grpc_millis grpc_timespec_to_millis_round_up(gpr_timespec timespec); - -void grpc_exec_ctx_maybe_update_start_time(); - #ifdef __cplusplus } #endif |