aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/pollset_windows.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/iomgr/pollset_windows.cc')
-rw-r--r--src/core/lib/iomgr/pollset_windows.cc29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/core/lib/iomgr/pollset_windows.cc b/src/core/lib/iomgr/pollset_windows.cc
index 95dd7d7ddd..6ef949aad7 100644
--- a/src/core/lib/iomgr/pollset_windows.cc
+++ b/src/core/lib/iomgr/pollset_windows.cc
@@ -92,20 +92,19 @@ void grpc_pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
&pollset->root_worker;
}
-void grpc_pollset_shutdown(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset,
- grpc_closure* closure) {
+void grpc_pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
pollset->shutting_down = 1;
- grpc_pollset_kick(exec_ctx, pollset, GRPC_POLLSET_KICK_BROADCAST);
+ grpc_pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST);
if (!pollset->is_iocp_worker) {
- GRPC_CLOSURE_SCHED(exec_ctx, closure, GRPC_ERROR_NONE);
+ GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_NONE);
} else {
pollset->on_shutdown = closure;
}
}
-void grpc_pollset_destroy(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset) {}
+void grpc_pollset_destroy(grpc_pollset* pollset) {}
-grpc_error* grpc_pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset,
+grpc_error* grpc_pollset_work(grpc_pollset* pollset,
grpc_pollset_worker** worker_hdl,
grpc_millis deadline) {
grpc_pollset_worker worker;
@@ -126,8 +125,8 @@ grpc_error* grpc_pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset,
pollset->is_iocp_worker = 1;
g_active_poller = &worker;
gpr_mu_unlock(&grpc_polling_mu);
- grpc_iocp_work(exec_ctx, deadline);
- grpc_exec_ctx_flush(exec_ctx);
+ grpc_iocp_work(deadline);
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(&grpc_polling_mu);
pollset->is_iocp_worker = 0;
g_active_poller = NULL;
@@ -145,7 +144,7 @@ grpc_error* grpc_pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset,
}
if (pollset->shutting_down && pollset->on_shutdown != NULL) {
- GRPC_CLOSURE_SCHED(exec_ctx, pollset->on_shutdown, GRPC_ERROR_NONE);
+ GRPC_CLOSURE_SCHED(pollset->on_shutdown, GRPC_ERROR_NONE);
pollset->on_shutdown = NULL;
}
goto done;
@@ -158,18 +157,18 @@ grpc_error* grpc_pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset,
while (!worker.kicked) {
if (gpr_cv_wait(&worker.cv, &grpc_polling_mu,
grpc_millis_to_timespec(deadline, GPR_CLOCK_REALTIME))) {
- grpc_exec_ctx_invalidate_now(exec_ctx);
+ grpc_core::ExecCtx::Get()->InvalidateNow();
break;
}
- grpc_exec_ctx_invalidate_now(exec_ctx);
+ grpc_core::ExecCtx::Get()->InvalidateNow();
}
} else {
pollset->kicked_without_pollers = 0;
}
done:
- if (!grpc_closure_list_empty(exec_ctx->closure_list)) {
+ if (!grpc_closure_list_empty(*grpc_core::ExecCtx::Get()->closure_list())) {
gpr_mu_unlock(&grpc_polling_mu);
- grpc_exec_ctx_flush(exec_ctx);
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(&grpc_polling_mu);
}
if (added_worker) {
@@ -181,7 +180,7 @@ done:
return GRPC_ERROR_NONE;
}
-grpc_error* grpc_pollset_kick(grpc_exec_ctx* exec_ctx, grpc_pollset* p,
+grpc_error* grpc_pollset_kick(grpc_pollset* p,
grpc_pollset_worker* specific_worker) {
if (specific_worker != NULL) {
if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) {
@@ -209,7 +208,7 @@ grpc_error* grpc_pollset_kick(grpc_exec_ctx* exec_ctx, grpc_pollset* p,
specific_worker =
pop_front_worker(&p->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET);
if (specific_worker != NULL) {
- grpc_pollset_kick(exec_ctx, p, specific_worker);
+ grpc_pollset_kick(p, specific_worker);
} else if (p->is_iocp_worker) {
grpc_iocp_kick();
} else {