aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-05-28 13:51:50 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-05-31 12:48:43 -0700
commit07997b6e89d155716b9dd79e02664ac95799baab (patch)
tree9250b067322a6ba0233553aeb2f2b2935e7874ce /src/core/iomgr
parent0c47d80769b0e1e8c7262911262dc92133bd24d5 (diff)
assert -> GPR_ASSERT
Diffstat (limited to 'src/core/iomgr')
-rw-r--r--src/core/iomgr/fd_posix.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c
index 672b321b95..6dcf1a3ec0 100644
--- a/src/core/iomgr/fd_posix.c
+++ b/src/core/iomgr/fd_posix.c
@@ -236,9 +236,8 @@ static void notify_on(grpc_fd *fd, gpr_atm *st, grpc_iomgr_closure *closure,
/* swap was unsuccessful due to an intervening set_ready call.
Fall through to the READY code below */
case READY:
- assert(gpr_atm_no_barrier_load(st) == READY);
+ GPR_ASSERT(gpr_atm_no_barrier_load(st) == READY);
gpr_atm_rel_store(st, NOT_READY);
- closure->success = -1;
process_callback(closure, !gpr_atm_acq_load(&fd->shutdown),
allow_synchronous_callback);
return;
@@ -271,8 +270,8 @@ static void set_ready_locked(gpr_atm *st, grpc_iomgr_closure *callbacks,
Fall through to the WAITING code below */
state = gpr_atm_acq_load(st);
default: /* waiting */
- assert(gpr_atm_no_barrier_load(st) != READY &&
- gpr_atm_no_barrier_load(st) != NOT_READY);
+ GPR_ASSERT(gpr_atm_no_barrier_load(st) != READY &&
+ gpr_atm_no_barrier_load(st) != NOT_READY);
callbacks[(*ncallbacks)++] = *(grpc_iomgr_closure *)state;
gpr_atm_rel_store(st, NOT_READY);
return;
@@ -291,7 +290,7 @@ static void set_ready(grpc_fd *fd, gpr_atm *st,
set_ready_locked(st, &closure, &ncb);
gpr_mu_unlock(&fd->set_state_mu);
success = !gpr_atm_acq_load(&fd->shutdown);
- assert(ncb <= 1);
+ GPR_ASSERT(ncb <= 1);
if (ncb > 0) {
grpc_iomgr_closure *managed_cb = gpr_malloc(sizeof(grpc_iomgr_closure));
grpc_iomgr_managed_closure_init(managed_cb, closure.cb, closure.cb_arg);
@@ -307,7 +306,7 @@ void grpc_fd_shutdown(grpc_fd *fd) {
set_ready_locked(&fd->readst, fd->shutdown_iocbs, &ncb);
set_ready_locked(&fd->writest, fd->shutdown_iocbs, &ncb);
gpr_mu_unlock(&fd->set_state_mu);
- assert(ncb <= 2);
+ GPR_ASSERT(ncb <= 2);
process_callbacks(fd->shutdown_iocbs, ncb, 0, 0);
}