diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-28 22:59:51 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-28 22:59:51 -0700 |
commit | afbae1f583b9b34b60a975c0cee7b336399ade8b (patch) | |
tree | e217e9682097f34fc8ef00b979b6a9149d525cdd /src/core/lib | |
parent | 8a03448a8c030d8a083e704061a5e89d9b9df01c (diff) |
Fix mutex
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index beccb9e89f..dba335490b 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -329,6 +329,7 @@ static grpc_fd *alloc_fd(int fd) { gpr_mu_init(&r->mu); } + gpr_mu_lock(&r->mu); gpr_atm_rel_store(&r->refst, 1); r->shutdown = 0; r->read_closure = CLOSURE_NOT_READY; @@ -341,6 +342,7 @@ static grpc_fd *alloc_fd(int fd) { r->on_done_closure = NULL; r->closed = 0; r->released = 0; + gpr_mu_unlock(&r->mu); return r; } |