Skip to content
Snippets Groups Projects
Commit c212e6cc authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix barrier, comment

parent d51bbeb1
No related branches found
No related tags found
No related merge requests found
...@@ -1173,9 +1173,9 @@ static void set_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_atm *state, ...@@ -1173,9 +1173,9 @@ static void set_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_atm *state,
switch (curr) { switch (curr) {
case CLOSURE_READY: case CLOSURE_READY:
case CLOSURE_NOT_READY: case CLOSURE_NOT_READY:
/* Release cas to pair with a set_ready performing a load of the /* Need a full barrier here so that the initial load in notify_on
shutdown state later */ doesn't need a barrier */
if (gpr_atm_rel_cas(state, curr, new_state)) { if (gpr_atm_full_cas(state, curr, new_state)) {
return; /* early out */ return; /* early out */
} }
break; /* retry */ break; /* retry */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment