aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/pollset_posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/iomgr/pollset_posix.h')
-rw-r--r--src/core/iomgr/pollset_posix.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h
index a3ea353de6..69bd9cca8c 100644
--- a/src/core/iomgr/pollset_posix.h
+++ b/src/core/iomgr/pollset_posix.h
@@ -34,6 +34,8 @@
#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H
+#include <poll.h>
+
#include <grpc/support/sync.h>
#include "src/core/iomgr/wakeup_fd_posix.h"
@@ -118,4 +120,8 @@ void grpc_poll_become_multipoller(grpc_pollset *pollset, struct grpc_fd **fds,
* be locked) */
int grpc_pollset_has_workers(grpc_pollset *pollset);
+/* override to allow tests to hook poll() usage */
+typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int);
+extern grpc_poll_function_type grpc_poll_function;
+
#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H */