aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2017-02-16 10:42:37 -0800
committerGravatar Sree Kuchibhotla <sreek@google.com>2017-02-16 10:42:37 -0800
commit21f2f0682b1199e528c1c7fd19a397c8b7762eb9 (patch)
tree3149eef85b1a510e34b1dd7eafc6c790e0e1a4ed /src/core/lib
parentfb7ced6416357b86bc318fe6d460f56becf7c3b4 (diff)
correct a few comments
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/iomgr/ev_epoll_linux.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c
index 2a0b8917e8..9fb527bf07 100644
--- a/src/core/lib/iomgr/ev_epoll_linux.c
+++ b/src/core/lib/iomgr/ev_epoll_linux.c
@@ -1108,8 +1108,8 @@ static void notify_on(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_atm *state,
grpc_closure *closure) {
while (true) {
/* Fast-path: CLOSURE_NOT_READY -> <closure> */
- /* Also do a release-cas here so that there is a 'happen-before' established
- with acquire loads in set_ready() / set_shutdown() */
+ /* Also do a release-cas here so that any acqire-loads in set_ready or
+ set_shutdown see this */
if (gpr_atm_rel_cas(state, CLOSURE_NOT_READY, (gpr_atm)closure)) {
return; /* Fast-path successful. Return */
}
@@ -1122,10 +1122,9 @@ static void notify_on(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_atm *state,
}
case CLOSURE_READY: {
- /* Change the state to CLOSURE_NOT_READY.
- If successful: Schedule the closure
- If not: Most likely the state transitioned to CLOSURE_NOT_READY.
- Retry the fast-path again */
+ /* Change the state to CLOSURE_NOT_READY. If successful: Schedule the
+ closure. If not, most likely the state transitioned to shutdown. We
+ should retry */
if (gpr_atm_rel_cas(state, CLOSURE_READY, CLOSURE_NOT_READY)) {
grpc_closure_sched(exec_ctx, closure, GRPC_ERROR_NONE);
return; /* Slow-path successful. Return */