diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2016-02-25 14:07:29 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2016-02-25 14:07:29 -0800 |
commit | 1d7704d7a1ac694fd4f3098437b98f2616368010 (patch) | |
tree | f82022fabf149d9773e0eb16d1a01bc42fd95003 /src | |
parent | 85371a2bb09dc955c35e194efb461ee3d374c128 (diff) |
Fix windows
Diffstat (limited to 'src')
-rw-r--r-- | src/core/httpcli/httpcli.c | 8 | ||||
-rw-r--r-- | src/core/iomgr/pollset_windows.c | 7 | ||||
-rw-r--r-- | src/core/iomgr/pollset_windows.h | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/src/core/httpcli/httpcli.c b/src/core/httpcli/httpcli.c index 71237bb614..2ac93ab6a3 100644 --- a/src/core/httpcli/httpcli.c +++ b/src/core/httpcli/httpcli.c @@ -36,15 +36,17 @@ #include <string.h> +#include <grpc/support/alloc.h> +#include <grpc/support/log.h> +#include <grpc/support/string_util.h> + #include "src/core/iomgr/endpoint.h" +#include "src/core/iomgr/iomgr_internal.h" #include "src/core/iomgr/resolve_address.h" #include "src/core/iomgr/tcp_client.h" #include "src/core/httpcli/format_request.h" #include "src/core/httpcli/parser.h" #include "src/core/support/string.h" -#include <grpc/support/alloc.h> -#include <grpc/support/log.h> -#include <grpc/support/string_util.h> typedef struct { gpr_slice request_text; diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index bbce23b46a..651f8e7334 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -89,12 +89,17 @@ static void push_front_worker(grpc_pollset_worker *root, worker->links[type].next->links[type].prev = worker; } +size_t grpc_pollset_size(void) { + return sizeof(grpc_pollset); +} + /* There isn't really any such thing as a pollset under Windows, due to the nature of the IO completion ports. We're still going to provide a minimal set of features for the sake of the rest of grpc. But grpc_pollset_work won't actually do any polling, and return as quickly as possible. */ -void grpc_pollset_init(grpc_pollset *pollset) { +void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) { + *mu = &grpc_polling_mu; memset(pollset, 0, sizeof(*pollset)); pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next = pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev = diff --git a/src/core/iomgr/pollset_windows.h b/src/core/iomgr/pollset_windows.h index c2f13fdfa8..dc0b7a4104 100644 --- a/src/core/iomgr/pollset_windows.h +++ b/src/core/iomgr/pollset_windows.h @@ -72,6 +72,4 @@ struct grpc_pollset { grpc_closure *on_shutdown; }; -extern gpr_mu grpc_polling_mu; - #endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */ |