aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/executor.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-14 18:11:22 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-14 18:11:22 -0800
commit6c26b16fe06b1cc75b4dac372f4f51f6b7d1bfc0 (patch)
tree5d9b7bbdcf125bfc103b67778349ea075b049bb4 /src/core/lib/iomgr/executor.cc
parent75122c23578e24417dcf64081c737571a9fc2dbc (diff)
Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes
Diffstat (limited to 'src/core/lib/iomgr/executor.cc')
-rw-r--r--src/core/lib/iomgr/executor.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc
index bf8805a2cd..4db298c1c5 100644
--- a/src/core/lib/iomgr/executor.cc
+++ b/src/core/lib/iomgr/executor.cc
@@ -78,7 +78,7 @@ static size_t run_closures(grpc_closure_list list) {
GRPC_ERROR_UNREF(error);
c = next;
n++;
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
return n;
@@ -145,7 +145,7 @@ static void executor_thread(void* arg) {
thread_state* ts = (thread_state*)arg;
gpr_tls_set(&g_this_thread_state, (intptr_t)ts);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
size_t subtract_depth = 0;
for (;;) {
@@ -175,7 +175,7 @@ static void executor_thread(void* arg) {
gpr_log(GPR_DEBUG, "EXECUTOR[%d]: execute", (int)(ts - g_thread_state));
}
- ExecCtx::Get()->InvalidateNow();
+ grpc_core::ExecCtx::Get()->InvalidateNow();
subtract_depth = run_closures(exec);
}
}
@@ -200,12 +200,14 @@ static void executor_push(grpc_closure* closure, grpc_error* error,
gpr_log(GPR_DEBUG, "EXECUTOR: schedule %p inline", closure);
#endif
}
- grpc_closure_list_append(ExecCtx::Get()->closure_list(), closure, error);
+ grpc_closure_list_append(grpc_core::ExecCtx::Get()->closure_list(),
+ closure, error);
return;
}
thread_state* ts = (thread_state*)gpr_tls_get(&g_this_thread_state);
if (ts == NULL) {
- ts = &g_thread_state[GPR_HASH_POINTER(ExecCtx::Get(), cur_thread_count)];
+ ts = &g_thread_state[GPR_HASH_POINTER(grpc_core::ExecCtx::Get(),
+ cur_thread_count)];
} else {
GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF();
}