diff options
author | 2016-02-19 16:22:44 -0800 | |
---|---|---|
committer | 2016-02-19 16:22:44 -0800 | |
commit | a8be91b3153fc75a425718799130172357507dd3 (patch) | |
tree | 94a9b0e1936ff743805c0876aa7de97b6ca4d14e /src/core/iomgr/pollset.h | |
parent | 3633ce48a9ec540c9608d2a7e773d4e1113bb1e1 (diff) |
Provide an interface firewall between pollset and its implementations
Starting to allow for >1 implementation of pollset within a binary.
Do so without requiring an extra allocation for completion queues (which
we could not tolerate).
Diffstat (limited to 'src/core/iomgr/pollset.h')
-rw-r--r-- | src/core/iomgr/pollset.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/core/iomgr/pollset.h b/src/core/iomgr/pollset.h index 0c0efad760..dfbd4a40ec 100644 --- a/src/core/iomgr/pollset.h +++ b/src/core/iomgr/pollset.h @@ -35,8 +35,11 @@ #define GRPC_INTERNAL_CORE_IOMGR_POLLSET_H #include <grpc/support/port_platform.h> +#include <grpc/support/sync.h> #include <grpc/support/time.h> +#include "src/core/iomgr/exec_ctx.h" + #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1) /* A grpc_pollset is a set of file descriptors that a higher level item is @@ -46,15 +49,11 @@ - a completion queue might keep a pollset with an entry for each transport that is servicing a call that it's tracking */ -#ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/pollset_posix.h" -#endif - -#ifdef GPR_WIN32 -#include "src/core/iomgr/pollset_windows.h" -#endif +typedef struct grpc_pollset grpc_pollset; +typedef struct grpc_pollset_worker grpc_pollset_worker; -void grpc_pollset_init(grpc_pollset *pollset); +size_t grpc_pollset_size(void); +void grpc_pollset_init(grpc_pollset *pollset, gpr_mu *mu); /* Begin shutting down the pollset, and call closure when done. * GRPC_POLLSET_MU(pollset) must be held */ void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, |