aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/ev_epoll_linux.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-03-30 08:26:21 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-03-30 08:26:21 -0700
commitc212e6cc5e005526a80320ac95424e46dd341ad5 (patch)
tree553dfd3b28c4e9b2369fc5f4ed6413350c9f417c /src/core/lib/iomgr/ev_epoll_linux.c
parentd51bbeb1ebc3afe6ce6f614eda3137fd39a70592 (diff)
Fix barrier, comment
Diffstat (limited to 'src/core/lib/iomgr/ev_epoll_linux.c')
-rw-r--r--src/core/lib/iomgr/ev_epoll_linux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c
index 97f8f82fed..f6372c0f3f 100644
--- a/src/core/lib/iomgr/ev_epoll_linux.c
+++ b/src/core/lib/iomgr/ev_epoll_linux.c
@@ -1173,9 +1173,9 @@ static void set_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_atm *state,
switch (curr) {
case CLOSURE_READY:
case CLOSURE_NOT_READY:
- /* Release cas to pair with a set_ready performing a load of the
- shutdown state later */
- if (gpr_atm_rel_cas(state, curr, new_state)) {
+ /* Need a full barrier here so that the initial load in notify_on
+ doesn't need a barrier */
+ if (gpr_atm_full_cas(state, curr, new_state)) {
return; /* early out */
}
break; /* retry */