Craig Tiller | f2d39b7 | 2015-01-21 15:06:08 -0800 | [diff] [blame] | 1 | /* |
| 2 | * |
Craig Tiller | 6169d5f | 2016-03-31 07:46:18 -0700 | [diff] [blame] | 3 | * Copyright 2015, Google Inc. |
Craig Tiller | f2d39b7 | 2015-01-21 15:06:08 -0800 | [diff] [blame] | 4 | * All rights reserved. |
| 5 | * |
| 6 | * Redistribution and use in source and binary forms, with or without |
| 7 | * modification, are permitted provided that the following conditions are |
| 8 | * met: |
| 9 | * |
| 10 | * * Redistributions of source code must retain the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer. |
| 12 | * * Redistributions in binary form must reproduce the above |
| 13 | * copyright notice, this list of conditions and the following disclaimer |
| 14 | * in the documentation and/or other materials provided with the |
| 15 | * distribution. |
| 16 | * * Neither the name of Google Inc. nor the names of its |
| 17 | * contributors may be used to endorse or promote products derived from |
| 18 | * this software without specific prior written permission. |
| 19 | * |
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | * |
| 32 | */ |
| 33 | |
murgatroid99 | 5407089 | 2016-08-08 17:01:18 -0700 | [diff] [blame] | 34 | #include "src/core/lib/iomgr/port.h" |
Craig Tiller | f2d39b7 | 2015-01-21 15:06:08 -0800 | [diff] [blame] | 35 | |
murgatroid99 | 623dd4f | 2016-08-08 17:31:27 -0700 | [diff] [blame] | 36 | #ifdef GRPC_WINSOCK_SOCKET |
Craig Tiller | f2d39b7 | 2015-01-21 15:06:08 -0800 | [diff] [blame] | 37 | |
Craig Tiller | 46714f9 | 2015-11-03 11:29:36 -0800 | [diff] [blame] | 38 | #include <grpc/support/log.h> |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 39 | #include <grpc/support/thd.h> |
| 40 | |
Craig Tiller | 9533d04 | 2016-03-25 17:11:06 -0700 | [diff] [blame] | 41 | #include "src/core/lib/iomgr/iocp_windows.h" |
| 42 | #include "src/core/lib/iomgr/iomgr_internal.h" |
| 43 | #include "src/core/lib/iomgr/pollset.h" |
| 44 | #include "src/core/lib/iomgr/pollset_windows.h" |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 45 | |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 46 | gpr_mu grpc_polling_mu; |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 47 | static grpc_pollset_worker *g_active_poller; |
| 48 | static grpc_pollset_worker g_global_root_worker; |
| 49 | |
Craig Tiller | 4c33dba | 2016-03-31 10:35:00 -0700 | [diff] [blame] | 50 | void grpc_pollset_global_init(void) { |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 51 | gpr_mu_init(&grpc_polling_mu); |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 52 | g_active_poller = NULL; |
| 53 | g_global_root_worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].next = |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 54 | g_global_root_worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].prev = |
| 55 | &g_global_root_worker; |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 56 | } |
| 57 | |
Craig Tiller | 4c33dba | 2016-03-31 10:35:00 -0700 | [diff] [blame] | 58 | void grpc_pollset_global_shutdown(void) { gpr_mu_destroy(&grpc_polling_mu); } |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 59 | |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 60 | static void remove_worker(grpc_pollset_worker *worker, |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 61 | grpc_pollset_worker_link_type type) { |
| 62 | worker->links[type].prev->links[type].next = worker->links[type].next; |
| 63 | worker->links[type].next->links[type].prev = worker->links[type].prev; |
| 64 | worker->links[type].next = worker->links[type].prev = worker; |
| 65 | } |
| 66 | |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 67 | static int has_workers(grpc_pollset_worker *root, |
| 68 | grpc_pollset_worker_link_type type) { |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 69 | return root->links[type].next != root; |
| 70 | } |
| 71 | |
| 72 | static grpc_pollset_worker *pop_front_worker( |
| 73 | grpc_pollset_worker *root, grpc_pollset_worker_link_type type) { |
| 74 | if (has_workers(root, type)) { |
| 75 | grpc_pollset_worker *w = root->links[type].next; |
| 76 | remove_worker(w, type); |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 77 | return w; |
| 78 | } else { |
| 79 | return NULL; |
| 80 | } |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 81 | } |
| 82 | |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 83 | static void push_front_worker(grpc_pollset_worker *root, |
| 84 | grpc_pollset_worker_link_type type, |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 85 | grpc_pollset_worker *worker) { |
| 86 | worker->links[type].prev = root; |
| 87 | worker->links[type].next = worker->links[type].prev->links[type].next; |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 88 | worker->links[type].prev->links[type].next = |
| 89 | worker->links[type].next->links[type].prev = worker; |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 90 | } |
| 91 | |
Craig Tiller | 8141696 | 2016-02-25 20:22:11 -0800 | [diff] [blame] | 92 | size_t grpc_pollset_size(void) { return sizeof(grpc_pollset); } |
Craig Tiller | 69b093b | 2016-02-25 19:04:07 -0800 | [diff] [blame] | 93 | |
Nicolas "Pixel" Noble | 0f981e9 | 2015-05-03 10:40:56 +0200 | [diff] [blame] | 94 | /* There isn't really any such thing as a pollset under Windows, due to the |
| 95 | nature of the IO completion ports. We're still going to provide a minimal |
| 96 | set of features for the sake of the rest of grpc. But grpc_pollset_work |
| 97 | won't actually do any polling, and return as quickly as possible. */ |
| 98 | |
Craig Tiller | 69b093b | 2016-02-25 19:04:07 -0800 | [diff] [blame] | 99 | void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) { |
| 100 | *mu = &grpc_polling_mu; |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 101 | memset(pollset, 0, sizeof(*pollset)); |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 102 | pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next = |
| 103 | pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev = |
| 104 | &pollset->root_worker; |
Nicolas Noble | a14ebbb | 2015-06-22 14:17:34 -0700 | [diff] [blame] | 105 | } |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 106 | |
Craig Tiller | 82f9bd8 | 2015-09-23 09:31:51 -0700 | [diff] [blame] | 107 | void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, |
| 108 | grpc_closure *closure) { |
Nicolas "Pixel" Noble | 857d250 | 2015-06-25 21:58:18 +0200 | [diff] [blame] | 109 | pollset->shutting_down = 1; |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 110 | grpc_pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 111 | if (!pollset->is_iocp_worker) { |
Craig Tiller | 332f1b3 | 2016-05-24 13:21:21 -0700 | [diff] [blame] | 112 | grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_NONE, NULL); |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 113 | } else { |
| 114 | pollset->on_shutdown = closure; |
| 115 | } |
David Klempner | b505661 | 2015-02-24 14:22:50 -0800 | [diff] [blame] | 116 | } |
| 117 | |
Craig Tiller | b7a5977 | 2015-10-01 08:01:58 -0700 | [diff] [blame] | 118 | void grpc_pollset_destroy(grpc_pollset *pollset) {} |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 119 | |
Craig Tiller | 46714f9 | 2015-11-03 11:29:36 -0800 | [diff] [blame] | 120 | void grpc_pollset_reset(grpc_pollset *pollset) { |
| 121 | GPR_ASSERT(pollset->shutting_down); |
Craig Tiller | 3c53bb2 | 2015-11-10 14:24:36 +0000 | [diff] [blame] | 122 | GPR_ASSERT( |
| 123 | !has_workers(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET)); |
Craig Tiller | 46714f9 | 2015-11-03 11:29:36 -0800 | [diff] [blame] | 124 | pollset->shutting_down = 0; |
| 125 | pollset->is_iocp_worker = 0; |
| 126 | pollset->kicked_without_pollers = 0; |
| 127 | pollset->on_shutdown = NULL; |
| 128 | } |
Craig Tiller | e8b5f62 | 2015-11-02 14:15:03 -0800 | [diff] [blame] | 129 | |
Craig Tiller | a41ac57 | 2016-05-17 16:08:17 -0700 | [diff] [blame] | 130 | grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, |
Craig Tiller | 3e149f3 | 2016-05-17 16:11:04 -0700 | [diff] [blame] | 131 | grpc_pollset_worker **worker_hdl, |
| 132 | gpr_timespec now, gpr_timespec deadline) { |
Craig Tiller | bd47928 | 2016-02-18 08:07:09 -0800 | [diff] [blame] | 133 | grpc_pollset_worker worker; |
| 134 | *worker_hdl = &worker; |
| 135 | |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 136 | int added_worker = 0; |
Craig Tiller | bd47928 | 2016-02-18 08:07:09 -0800 | [diff] [blame] | 137 | worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next = |
| 138 | worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev = |
| 139 | worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].next = |
| 140 | worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].prev = NULL; |
| 141 | worker.kicked = 0; |
| 142 | worker.pollset = pollset; |
| 143 | gpr_cv_init(&worker.cv); |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 144 | if (!pollset->kicked_without_pollers && !pollset->shutting_down) { |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 145 | if (g_active_poller == NULL) { |
| 146 | grpc_pollset_worker *next_worker; |
| 147 | /* become poller */ |
| 148 | pollset->is_iocp_worker = 1; |
Craig Tiller | bd47928 | 2016-02-18 08:07:09 -0800 | [diff] [blame] | 149 | g_active_poller = &worker; |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 150 | gpr_mu_unlock(&grpc_polling_mu); |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 151 | grpc_iocp_work(exec_ctx, deadline); |
Craig Tiller | 0b6312e | 2015-09-30 08:36:27 -0700 | [diff] [blame] | 152 | grpc_exec_ctx_flush(exec_ctx); |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 153 | gpr_mu_lock(&grpc_polling_mu); |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 154 | pollset->is_iocp_worker = 0; |
| 155 | g_active_poller = NULL; |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 156 | /* try to get a worker from this pollsets worker list */ |
Craig Tiller | b7a5977 | 2015-10-01 08:01:58 -0700 | [diff] [blame] | 157 | next_worker = pop_front_worker(&pollset->root_worker, |
| 158 | GRPC_POLLSET_WORKER_LINK_POLLSET); |
| 159 | if (next_worker == NULL) { |
| 160 | /* try to get a worker from the global list */ |
| 161 | next_worker = pop_front_worker(&g_global_root_worker, |
| 162 | GRPC_POLLSET_WORKER_LINK_GLOBAL); |
| 163 | } |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 164 | if (next_worker != NULL) { |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 165 | next_worker->kicked = 1; |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 166 | gpr_cv_signal(&next_worker->cv); |
| 167 | } |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 168 | |
| 169 | if (pollset->shutting_down && pollset->on_shutdown != NULL) { |
Craig Tiller | 332f1b3 | 2016-05-24 13:21:21 -0700 | [diff] [blame] | 170 | grpc_exec_ctx_sched(exec_ctx, pollset->on_shutdown, GRPC_ERROR_NONE, |
Craig Tiller | 77c983d | 2016-05-24 13:23:14 -0700 | [diff] [blame] | 171 | NULL); |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 172 | pollset->on_shutdown = NULL; |
| 173 | } |
| 174 | goto done; |
| 175 | } |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 176 | push_front_worker(&g_global_root_worker, GRPC_POLLSET_WORKER_LINK_GLOBAL, |
Craig Tiller | bd47928 | 2016-02-18 08:07:09 -0800 | [diff] [blame] | 177 | &worker); |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 178 | push_front_worker(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET, |
Craig Tiller | bd47928 | 2016-02-18 08:07:09 -0800 | [diff] [blame] | 179 | &worker); |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 180 | added_worker = 1; |
Craig Tiller | bd47928 | 2016-02-18 08:07:09 -0800 | [diff] [blame] | 181 | while (!worker.kicked) { |
| 182 | if (gpr_cv_wait(&worker.cv, &grpc_polling_mu, deadline)) { |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 183 | break; |
| 184 | } |
| 185 | } |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 186 | } else { |
| 187 | pollset->kicked_without_pollers = 0; |
| 188 | } |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 189 | done: |
Craig Tiller | 258f8de | 2015-09-23 12:32:40 -0700 | [diff] [blame] | 190 | if (!grpc_closure_list_empty(exec_ctx->closure_list)) { |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 191 | gpr_mu_unlock(&grpc_polling_mu); |
Craig Tiller | 258f8de | 2015-09-23 12:32:40 -0700 | [diff] [blame] | 192 | grpc_exec_ctx_flush(exec_ctx); |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 193 | gpr_mu_lock(&grpc_polling_mu); |
Craig Tiller | 258f8de | 2015-09-23 12:32:40 -0700 | [diff] [blame] | 194 | } |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 195 | if (added_worker) { |
Craig Tiller | bd47928 | 2016-02-18 08:07:09 -0800 | [diff] [blame] | 196 | remove_worker(&worker, GRPC_POLLSET_WORKER_LINK_GLOBAL); |
| 197 | remove_worker(&worker, GRPC_POLLSET_WORKER_LINK_POLLSET); |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 198 | } |
Craig Tiller | 9114a14 | 2016-02-24 08:40:30 -0800 | [diff] [blame] | 199 | gpr_cv_destroy(&worker.cv); |
Craig Tiller | bd47928 | 2016-02-18 08:07:09 -0800 | [diff] [blame] | 200 | *worker_hdl = NULL; |
Craig Tiller | a41ac57 | 2016-05-17 16:08:17 -0700 | [diff] [blame] | 201 | return GRPC_ERROR_NONE; |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 202 | } |
| 203 | |
Craig Tiller | 3e149f3 | 2016-05-17 16:11:04 -0700 | [diff] [blame] | 204 | grpc_error *grpc_pollset_kick(grpc_pollset *p, |
| 205 | grpc_pollset_worker *specific_worker) { |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 206 | if (specific_worker != NULL) { |
| 207 | if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) { |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 208 | for (specific_worker = |
| 209 | p->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next; |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 210 | specific_worker != &p->root_worker; |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 211 | specific_worker = |
| 212 | specific_worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].next) { |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 213 | specific_worker->kicked = 1; |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 214 | gpr_cv_signal(&specific_worker->cv); |
| 215 | } |
| 216 | p->kicked_without_pollers = 1; |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 217 | if (p->is_iocp_worker) { |
| 218 | grpc_iocp_kick(); |
| 219 | } |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 220 | } else { |
Craig Tiller | 10d3e59 | 2016-02-10 10:32:04 -0800 | [diff] [blame] | 221 | if (p->is_iocp_worker && g_active_poller == specific_worker) { |
| 222 | grpc_iocp_kick(); |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 223 | } else { |
Craig Tiller | 084c808 | 2015-09-29 11:19:06 -0700 | [diff] [blame] | 224 | specific_worker->kicked = 1; |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 225 | gpr_cv_signal(&specific_worker->cv); |
| 226 | } |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 227 | } |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 228 | } else { |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 229 | specific_worker = |
| 230 | pop_front_worker(&p->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET); |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 231 | if (specific_worker != NULL) { |
Craig Tiller | 3dedb70 | 2015-09-24 10:31:26 -0700 | [diff] [blame] | 232 | grpc_pollset_kick(p, specific_worker); |
| 233 | } else if (p->is_iocp_worker) { |
| 234 | grpc_iocp_kick(); |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 235 | } else { |
| 236 | p->kicked_without_pollers = 1; |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 237 | } |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 238 | } |
Craig Tiller | a41ac57 | 2016-05-17 16:08:17 -0700 | [diff] [blame] | 239 | return GRPC_ERROR_NONE; |
Craig Tiller | d1885e0 | 2015-07-30 14:32:31 -0700 | [diff] [blame] | 240 | } |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 241 | |
Craig Tiller | 71a0f9d | 2015-09-28 17:22:01 -0700 | [diff] [blame] | 242 | void grpc_kick_poller(void) { grpc_iocp_kick(); } |
Craig Tiller | 26465e8 | 2015-09-28 17:08:30 -0700 | [diff] [blame] | 243 | |
murgatroid99 | 623dd4f | 2016-08-08 17:31:27 -0700 | [diff] [blame] | 244 | #endif /* GRPC_WINSOCK_SOCKET */ |