aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/pollset_posix.h
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-10-06 13:24:54 -0700
committerGravatar Vijay Pai <vpai@google.com>2015-10-06 13:24:54 -0700
commitfbfd3d42d2f4fcbc627b713f5ba7f0540bc0a8d0 (patch)
tree566b3e116571652c2362f0baf6d4230df2ed5c09 /src/core/iomgr/pollset_posix.h
parentc02cb03eccb3bcf83046b8228901e3af572ba4ac (diff)
parent6078a7d36728e4711eee6897c033c3ad60acba49 (diff)
Merge pull request #3610 from ctiller/stressy
Fix thread stuck problem on Mac
Diffstat (limited to 'src/core/iomgr/pollset_posix.h')
-rw-r--r--src/core/iomgr/pollset_posix.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h
index 83c5258539..34f76db2af 100644
--- a/src/core/iomgr/pollset_posix.h
+++ b/src/core/iomgr/pollset_posix.h
@@ -50,6 +50,7 @@ struct grpc_fd;
typedef struct grpc_pollset_worker {
grpc_wakeup_fd wakeup_fd;
+ int reevaluate_polling_on_wakeup;
struct grpc_pollset_worker *next;
struct grpc_pollset_worker *prev;
} grpc_pollset_worker;
@@ -111,6 +112,16 @@ void grpc_kick_drain(grpc_pollset *p);
int grpc_poll_deadline_to_millis_timeout(gpr_timespec deadline,
gpr_timespec now);
+/* Allow kick to wakeup the currently polling worker */
+#define GRPC_POLLSET_CAN_KICK_SELF 1
+/* Force the wakee to repoll when awoken */
+#define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2
+/* As per grpc_pollset_kick, with an extended set of flags (defined above)
+ -- mostly for fd_posix's use. */
+void grpc_pollset_kick_ext(grpc_pollset *p,
+ grpc_pollset_worker *specific_worker,
+ gpr_uint32 flags);
+
/* turn a pollset into a multipoller: platform specific */
typedef void (*grpc_platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx,
grpc_pollset *pollset,