Fix windows and uv build

reviewable/pr12219/r3
Yuchen Zeng 7 years ago
parent 59e16b1a7d
commit 01432b7cf3
  1. 23
      src/core/lib/iomgr/tcp_uv.cc
  2. 18
      src/core/lib/iomgr/tcp_windows.cc

@ -304,6 +304,15 @@ static void uv_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
(void)pollset; (void)pollset;
} }
static void uv_delete_from_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_endpoint *ep,
grpc_pollset_set *pollset) {
// No-op. We're ignoring pollsets currently
(void)exec_ctx;
(void)ep;
(void)pollset;
}
static void shutdown_callback(uv_shutdown_t *req, int status) {} static void shutdown_callback(uv_shutdown_t *req, int status) {}
static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
@ -340,10 +349,16 @@ static grpc_resource_user *uv_get_resource_user(grpc_endpoint *ep) {
static int uv_get_fd(grpc_endpoint *ep) { return -1; } static int uv_get_fd(grpc_endpoint *ep) { return -1; }
static grpc_endpoint_vtable vtable = { static grpc_endpoint_vtable vtable = {uv_endpoint_read,
uv_endpoint_read, uv_endpoint_write, uv_add_to_pollset, uv_endpoint_write,
uv_add_to_pollset_set, uv_endpoint_shutdown, uv_destroy, uv_add_to_pollset,
uv_get_resource_user, uv_get_peer, uv_get_fd}; uv_add_to_pollset_set,
uv_delete_from_pollset_set,
uv_endpoint_shutdown,
uv_destroy,
uv_get_resource_user,
uv_get_peer,
uv_get_fd};
grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle,
grpc_resource_quota *resource_quota, grpc_resource_quota *resource_quota,

@ -371,6 +371,10 @@ static void win_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
grpc_iocp_add_socket(tcp->socket); grpc_iocp_add_socket(tcp->socket);
} }
static void win_delete_from_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_endpoint *ep,
grpc_pollset_set *pss) {}
/* Initiates a shutdown of the TCP endpoint. This will queue abort callbacks /* Initiates a shutdown of the TCP endpoint. This will queue abort callbacks
for the potential read and write operations. It is up to the caller to for the potential read and write operations. It is up to the caller to
guarantee this isn't called in parallel to a read or write request, so guarantee this isn't called in parallel to a read or write request, so
@ -412,10 +416,16 @@ static grpc_resource_user *win_get_resource_user(grpc_endpoint *ep) {
static int win_get_fd(grpc_endpoint *ep) { return -1; } static int win_get_fd(grpc_endpoint *ep) { return -1; }
static grpc_endpoint_vtable vtable = { static grpc_endpoint_vtable vtable = {win_read,
win_read, win_write, win_add_to_pollset, win_add_to_pollset_set, win_write,
win_shutdown, win_destroy, win_get_resource_user, win_get_peer, win_add_to_pollset,
win_get_fd}; win_add_to_pollset_set,
win_delete_from_pollset_set,
win_shutdown,
win_destroy,
win_get_resource_user,
win_get_peer,
win_get_fd};
grpc_endpoint *grpc_tcp_create(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket, grpc_endpoint *grpc_tcp_create(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket,
grpc_channel_args *channel_args, grpc_channel_args *channel_args,

Loading…
Cancel
Save