aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-09-27 15:25:21 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-09-27 15:25:21 -0700
commit74c729ce45ad8bc365e94def3e9ab167e016b0ed (patch)
tree315a4c87b2084f82bb72e656145b351f22ba3dce /src/core/lib
parent57d1bae72be3deb63230dd7967a9aab458e56f6d (diff)
Remove another cv
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/gpr/sync_posix.cc11
-rw-r--r--src/core/lib/iomgr/timer_manager.cc9
2 files changed, 8 insertions, 12 deletions
diff --git a/src/core/lib/gpr/sync_posix.cc b/src/core/lib/gpr/sync_posix.cc
index cd7ec90c57..87356e9969 100644
--- a/src/core/lib/gpr/sync_posix.cc
+++ b/src/core/lib/gpr/sync_posix.cc
@@ -33,13 +33,11 @@
void (*g_grpc_debug_timer_manager_stats)(int64_t timer_manager_init_count,
int64_t timer_manager_shutdown_count,
int64_t fork_count,
- int64_t timer_wait_err,
- int64_t timer_wait_cv) = nullptr;
+ int64_t timer_wait_err) = nullptr;
int64_t g_timer_manager_init_count = 0;
int64_t g_timer_manager_shutdown_count = 0;
int64_t g_fork_count = 0;
int64_t g_timer_wait_err = 0;
-int64_t g_timer_wait_cv = 0;
#endif // GRPC_DEBUG_TIMER_MANAGER
#ifdef GPR_LOW_LEVEL_COUNTERS
@@ -110,10 +108,9 @@ int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu, gpr_timespec abs_deadline) {
if (!(err == 0 || err == ETIMEDOUT || err == EAGAIN)) {
if (g_grpc_debug_timer_manager_stats) {
g_timer_wait_err = err;
- g_timer_wait_cv = (int64_t)cv;
- g_grpc_debug_timer_manager_stats(
- g_timer_manager_init_count, g_timer_manager_shutdown_count,
- g_fork_count, g_timer_wait_err, g_timer_wait_cv);
+ g_grpc_debug_timer_manager_stats(g_timer_manager_init_count,
+ g_timer_manager_shutdown_count,
+ g_fork_count, g_timer_wait_err);
}
GPR_ASSERT(err == 0 || err == ETIMEDOUT || err == EAGAIN);
}
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc
index 3be1209228..ba4d50ac42 100644
--- a/src/core/lib/iomgr/timer_manager.cc
+++ b/src/core/lib/iomgr/timer_manager.cc
@@ -68,7 +68,6 @@ extern int64_t g_timer_manager_init_count;
extern int64_t g_timer_manager_shutdown_count;
extern int64_t g_fork_count;
extern int64_t g_timer_wait_err;
-extern int64_t g_timer_wait_cv;
#endif // GRPC_DEBUG_TIMER_MANAGER
static void gc_completed_threads(void) {
@@ -334,9 +333,9 @@ static void stop_threads(void) {
}
void grpc_timer_manager_shutdown(void) {
-// For debug of the timer manager crash only.
-// TODO (mxyan): remove after bug is fixed.
#ifdef GRPC_DEBUG_TIMER_MANAGER
+ // For debug of the timer manager crash only.
+ // TODO (mxyan): remove after bug is fixed.
g_timer_manager_shutdown_count++;
#endif
stop_threads();
@@ -347,9 +346,9 @@ void grpc_timer_manager_shutdown(void) {
}
void grpc_timer_manager_set_threading(bool threaded) {
-// For debug of the timer manager crash only.
-// TODO (mxyan): remove after bug is fixed.
#ifdef GRPC_DEBUG_TIMER_MANAGER
+ // For debug of the timer manager crash only.
+ // TODO (mxyan): remove after bug is fixed.
g_fork_count++;
#endif
if (threaded) {