aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/workqueue_posix.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-09-12 11:59:45 -0700
committerGravatar GitHub <noreply@github.com>2016-09-12 11:59:45 -0700
commit57726ca5a9c08ba17c882a798b93e03d333edd9f (patch)
treebdf922ed4a33a2290bab32f236b6584cbfc0e50d /src/core/lib/iomgr/workqueue_posix.h
parent6e51f992c6bfdfba61d984ab173305da455bd2e7 (diff)
Revert "Revert "Grand unified closures""
Diffstat (limited to 'src/core/lib/iomgr/workqueue_posix.h')
-rw-r--r--src/core/lib/iomgr/workqueue_posix.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/lib/iomgr/workqueue_posix.h b/src/core/lib/iomgr/workqueue_posix.h
index 0f26ba58e2..03ee21cef7 100644
--- a/src/core/lib/iomgr/workqueue_posix.h
+++ b/src/core/lib/iomgr/workqueue_posix.h
@@ -35,14 +35,17 @@
#define GRPC_CORE_LIB_IOMGR_WORKQUEUE_POSIX_H
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
+#include "src/core/lib/support/mpscq.h"
struct grpc_fd;
struct grpc_workqueue {
gpr_refcount refs;
-
- gpr_mu mu;
- grpc_closure_list closure_list;
+ gpr_mpscq queue;
+ // state is:
+ // lower bit - zero if orphaned
+ // other bits - number of items enqueued
+ gpr_atm state;
grpc_wakeup_fd wakeup_fd;
struct grpc_fd *wakeup_read_fd;