diff options
author | Vijay Pai <vpai@google.com> | 2015-10-12 18:30:04 +0000 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2015-10-12 18:30:04 +0000 |
commit | b1004103a8666193f60f0d4ecc3be31ceb2b3847 (patch) | |
tree | 73233b2137e8e09ff49ddf7c6a4586498431c626 | |
parent | 3e1b97225d56ab08416b924d735ce8e53e70f205 (diff) |
Stop using atm operations on fd->shutdown since that is already used
within fd->mu anyway (and is not the right size for atm in some cases)
-rw-r--r-- | src/core/iomgr/fd_posix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index 231bc988a8..7ff80e6cf8 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -286,7 +286,7 @@ static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { void grpc_fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); - GPR_ASSERT(!gpr_atm_no_barrier_load(&fd->shutdown)); + GPR_ASSERT(!fd->shutdown); fd->shutdown = 1; set_ready_locked(exec_ctx, fd, &fd->read_closure); set_ready_locked(exec_ctx, fd, &fd->write_closure); @@ -320,7 +320,7 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, gpr_mu_lock(&fd->mu); /* if we are shutdown, then don't add to the watcher set */ - if (gpr_atm_no_barrier_load(&fd->shutdown)) { + if (fd->shutdown) { watcher->fd = NULL; watcher->pollset = NULL; watcher->worker = NULL; |