Skip to content
Snippets Groups Projects
Commit 460da03d authored by Craig Tiller's avatar Craig Tiller
Browse files

Fixup Windows source files for new closure APIs

parent 801c6cc5
No related branches found
No related tags found
No related merge requests found
...@@ -167,8 +167,7 @@ grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, ...@@ -167,8 +167,7 @@ grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
} }
if (pollset->shutting_down && pollset->on_shutdown != NULL) { if (pollset->shutting_down && pollset->on_shutdown != NULL) {
grpc_closure_sched(exec_ctx, pollset->on_shutdown, GRPC_ERROR_NONE, grpc_closure_sched(exec_ctx, pollset->on_shutdown, GRPC_ERROR_NONE);
NULL);
pollset->on_shutdown = NULL; pollset->on_shutdown = NULL;
} }
goto done; goto done;
......
...@@ -173,12 +173,12 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, ...@@ -173,12 +173,12 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name,
grpc_closure *on_done, grpc_closure *on_done,
grpc_resolved_addresses **addresses) { grpc_resolved_addresses **addresses) {
request *r = gpr_malloc(sizeof(request)); request *r = gpr_malloc(sizeof(request));
grpc_closure_init(&r->request_closure, do_request_thread, r, grpc_schedule_on_exec_ctx); grpc_closure_init(&r->request_closure, do_request_thread, r, grpc_executor_scheduler);
r->name = gpr_strdup(name); r->name = gpr_strdup(name);
r->default_port = gpr_strdup(default_port); r->default_port = gpr_strdup(default_port);
r->on_done = on_done; r->on_done = on_done;
r->addresses = addresses; r->addresses = addresses;
grpc_executor_push(&r->request_closure, GRPC_ERROR_NONE); grpc_closure_sched(exec_ctx,&r->request_closure, GRPC_ERROR_NONE);
} }
void (*grpc_resolve_address)( void (*grpc_resolve_address)(
......
...@@ -165,8 +165,8 @@ static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, ...@@ -165,8 +165,8 @@ static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx,
grpc_closure_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE); grpc_closure_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE);
} }
grpc_closure_sched(exec_ctx, grpc_closure_create(destroy_server, s), grpc_closure_sched(exec_ctx, grpc_closure_create(destroy_server, s, grpc_schedule_on_exec_ctx),
GRPC_ERROR_NONE, NULL); GRPC_ERROR_NONE);
} }
grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s) { grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s) {
...@@ -204,7 +204,7 @@ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { ...@@ -204,7 +204,7 @@ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) {
if (gpr_unref(&s->refs)) { if (gpr_unref(&s->refs)) {
grpc_tcp_server_shutdown_listeners(exec_ctx, s); grpc_tcp_server_shutdown_listeners(exec_ctx, s);
gpr_mu_lock(&s->mu); gpr_mu_lock(&s->mu);
grpc_closure_list_sched(exec_ctx, &s->shutdown_starting, NULL); grpc_closure_list_sched(exec_ctx, &s->shutdown_starting);
gpr_mu_unlock(&s->mu); gpr_mu_unlock(&s->mu);
tcp_server_destroy(exec_ctx, s); tcp_server_destroy(exec_ctx, s);
} }
......
...@@ -203,7 +203,7 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, ...@@ -203,7 +203,7 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
if (tcp->shutting_down) { if (tcp->shutting_down) {
grpc_closure_sched(exec_ctx, cb, grpc_closure_sched(exec_ctx, cb,
GRPC_ERROR_CREATE("TCP socket is shutting down"), NULL); GRPC_ERROR_CREATE("TCP socket is shutting down"));
return; return;
} }
...@@ -241,7 +241,7 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, ...@@ -241,7 +241,7 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
if (wsa_error != WSA_IO_PENDING) { if (wsa_error != WSA_IO_PENDING) {
info->wsa_error = wsa_error; info->wsa_error = wsa_error;
grpc_closure_sched(exec_ctx, &tcp->on_read, grpc_closure_sched(exec_ctx, &tcp->on_read,
GRPC_WSA_ERROR(info->wsa_error, "WSARecv"), NULL); GRPC_WSA_ERROR(info->wsa_error, "WSARecv"));
return; return;
} }
} }
...@@ -291,7 +291,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, ...@@ -291,7 +291,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
if (tcp->shutting_down) { if (tcp->shutting_down) {
grpc_closure_sched(exec_ctx, cb, grpc_closure_sched(exec_ctx, cb,
GRPC_ERROR_CREATE("TCP socket is shutting down"), NULL); GRPC_ERROR_CREATE("TCP socket is shutting down"));
return; return;
} }
...@@ -340,8 +340,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, ...@@ -340,8 +340,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
int wsa_error = WSAGetLastError(); int wsa_error = WSAGetLastError();
if (wsa_error != WSA_IO_PENDING) { if (wsa_error != WSA_IO_PENDING) {
TCP_UNREF(exec_ctx, tcp, "write"); TCP_UNREF(exec_ctx, tcp, "write");
grpc_closure_sched(exec_ctx, cb, GRPC_WSA_ERROR(wsa_error, "WSASend"), grpc_closure_sched(exec_ctx, cb, GRPC_WSA_ERROR(wsa_error, "WSASend"));
NULL);
return; return;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment