aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-06-30 15:42:41 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-06-30 15:42:41 -0700
commitd6ba6192b048fd3f8be1e6d13dd9d95489ce2065 (patch)
tree95da42fda3ecd418391ba9bd8eee707a7c2c8a4c /src/core/lib
parentb39307d2bcf859b9e7dfa485fae263f6a73e35b6 (diff)
Add accessor for fd related workqueue
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/iomgr/ev_epoll_linux.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c
index ac6a215725..6dfd363b0b 100644
--- a/src/core/lib/iomgr/ev_epoll_linux.c
+++ b/src/core/lib/iomgr/ev_epoll_linux.c
@@ -1024,7 +1024,16 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
gpr_mu_unlock(&fd->mu);
}
-static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { return NULL; }
+static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) {
+ gpr_mu_lock(&fd->pi_mu);
+ grpc_workqueue *workqueue = NULL;
+ if (fd->polling_island != NULL) {
+ workqueue =
+ GRPC_WORKQUEUE_REF(fd->polling_island->workqueue, "get_workqueue");
+ }
+ gpr_mu_unlock(&fd->pi_mu);
+ return workqueue;
+}
/*******************************************************************************
* Pollset Definitions