diff options
author | Sree Kuchibhotla <sreek@google.com> | 2016-06-21 18:01:14 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2016-06-21 18:01:14 -0700 |
commit | 24b6eae1fc71a4f5d18eb2e7c1cbca5b4e54a46f (patch) | |
tree | 9ca50bb1fc37826e1b8632f9951d61a0fd5f012b /src/core/lib/iomgr | |
parent | 0100b2f1c0b08800ba0f7f53fe9cb5fbec7881a7 (diff) |
Add missing function fd_is_shutdown
Diffstat (limited to 'src/core/lib/iomgr')
-rw-r--r-- | src/core/lib/iomgr/ev_epoll_linux.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index c077987c01..3a774a8876 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -942,6 +942,13 @@ static grpc_pollset *fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, return notifier; } +static bool fd_is_shutdown(grpc_fd *fd) { + gpr_mu_lock(&fd->mu); + const bool r = fd->shutdown; + gpr_mu_unlock(&fd->mu); + return r; +} + /* Might be called multiple times */ static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); @@ -1659,6 +1666,7 @@ static const grpc_event_engine_vtable vtable = { .fd_wrapped_fd = fd_wrapped_fd, .fd_orphan = fd_orphan, .fd_shutdown = fd_shutdown, + .fd_is_shutdown = fd_is_shutdown, .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, |