diff options
author | Muxi Yan <mxyan@google.com> | 2018-11-11 22:50:42 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-11-11 22:50:42 -0800 |
commit | d0539dcc3693458f89e75a4f4d0d6534c40ebfa3 (patch) | |
tree | b0a2ae7022fa537a8d0a1fc3872f93682f42e6fb /src | |
parent | 6d0add97736b781acbf5a155229e14cb6200253e (diff) |
Prevent dead-stripping by explicitly calling init
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/surface/init.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc index c6198b8ae7..6d58c78ffc 100644 --- a/src/core/lib/surface/init.cc +++ b/src/core/lib/surface/init.cc @@ -114,8 +114,21 @@ void grpc_register_plugin(void (*init)(void), void (*destroy)(void)) { g_number_of_plugins++; } +// For debug of the timer manager crash only. +// TODO (mxyan): remove after bug is fixed. +#ifdef GRPC_DEBUG_TIMER_MANAGER +void init_debug_timer_manager(); +#endif + void grpc_init(void) { int i; + +// For debug of the timer manager crash only. +// TODO (mxyan): remove after bug is fixed. + #ifdef GRPC_DEBUG_TIMER_MANAGER + init_debug_timer_manager(); + #endif + gpr_once_init(&g_basic_init, do_basic_init); gpr_mu_lock(&g_init_mu); |