Fixup Windows source files for new closure APIs

pull/9207/head
Craig Tiller 8 years ago
parent 801c6cc548
commit 460da03d0c
  1. 3
      src/core/lib/iomgr/pollset_windows.c
  2. 4
      src/core/lib/iomgr/resolve_address_windows.c
  3. 6
      src/core/lib/iomgr/tcp_server_windows.c
  4. 9
      src/core/lib/iomgr/tcp_windows.c

@ -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) {
grpc_closure_sched(exec_ctx, pollset->on_shutdown, GRPC_ERROR_NONE,
NULL);
grpc_closure_sched(exec_ctx, pollset->on_shutdown, GRPC_ERROR_NONE);
pollset->on_shutdown = NULL;
}
goto done;

@ -173,12 +173,12 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name,
grpc_closure *on_done,
grpc_resolved_addresses **addresses) {
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->default_port = gpr_strdup(default_port);
r->on_done = on_done;
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)(

@ -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, grpc_closure_create(destroy_server, s),
GRPC_ERROR_NONE, NULL);
grpc_closure_sched(exec_ctx, grpc_closure_create(destroy_server, s, grpc_schedule_on_exec_ctx),
GRPC_ERROR_NONE);
}
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) {
if (gpr_unref(&s->refs)) {
grpc_tcp_server_shutdown_listeners(exec_ctx, s);
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);
tcp_server_destroy(exec_ctx, s);
}

@ -203,7 +203,7 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
if (tcp->shutting_down) {
grpc_closure_sched(exec_ctx, cb,
GRPC_ERROR_CREATE("TCP socket is shutting down"), NULL);
GRPC_ERROR_CREATE("TCP socket is shutting down"));
return;
}
@ -241,7 +241,7 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
if (wsa_error != WSA_IO_PENDING) {
info->wsa_error = wsa_error;
grpc_closure_sched(exec_ctx, &tcp->on_read,
GRPC_WSA_ERROR(info->wsa_error, "WSARecv"), NULL);
GRPC_WSA_ERROR(info->wsa_error, "WSARecv"));
return;
}
}
@ -291,7 +291,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
if (tcp->shutting_down) {
grpc_closure_sched(exec_ctx, cb,
GRPC_ERROR_CREATE("TCP socket is shutting down"), NULL);
GRPC_ERROR_CREATE("TCP socket is shutting down"));
return;
}
@ -340,8 +340,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
int wsa_error = WSAGetLastError();
if (wsa_error != WSA_IO_PENDING) {
TCP_UNREF(exec_ctx, tcp, "write");
grpc_closure_sched(exec_ctx, cb, GRPC_WSA_ERROR(wsa_error, "WSASend"),
NULL);
grpc_closure_sched(exec_ctx, cb, GRPC_WSA_ERROR(wsa_error, "WSASend"));
return;
}
}

Loading…
Cancel
Save