aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/combiner.cc
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2017-11-13 16:44:02 -0800
committerGravatar Noah Eisen <ncteisen@google.com>2017-11-13 16:44:02 -0800
commit68bb1bf7480e87005220003985da19ea0a0929d0 (patch)
treec434576b07f94f427925dd7f7dfba4dbdeecee31 /src/core/lib/iomgr/combiner.cc
parent6bf73e8cf6d9d2ede844ab628a0b88000ffc9afa (diff)
parentb0bad8f3864dc9c8745736fe68efe513b2b84932 (diff)
Merge branch 'master' of https://github.com/grpc/grpc into tracing++
Diffstat (limited to 'src/core/lib/iomgr/combiner.cc')
-rw-r--r--src/core/lib/iomgr/combiner.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/lib/iomgr/combiner.cc b/src/core/lib/iomgr/combiner.cc
index ab583ded0d..15c009dd77 100644
--- a/src/core/lib/iomgr/combiner.cc
+++ b/src/core/lib/iomgr/combiner.cc
@@ -131,8 +131,8 @@ grpc_combiner* grpc_combiner_ref(grpc_combiner* lock GRPC_COMBINER_DEBUG_ARGS) {
static void push_last_on_exec_ctx(grpc_exec_ctx* exec_ctx,
grpc_combiner* lock) {
- lock->next_combiner_on_this_exec_ctx = NULL;
- if (exec_ctx->active_combiner == NULL) {
+ lock->next_combiner_on_this_exec_ctx = nullptr;
+ if (exec_ctx->active_combiner == nullptr) {
exec_ctx->active_combiner = exec_ctx->last_combiner = lock;
} else {
exec_ctx->last_combiner->next_combiner_on_this_exec_ctx = lock;
@@ -144,7 +144,7 @@ static void push_first_on_exec_ctx(grpc_exec_ctx* exec_ctx,
grpc_combiner* lock) {
lock->next_combiner_on_this_exec_ctx = exec_ctx->active_combiner;
exec_ctx->active_combiner = lock;
- if (lock->next_combiner_on_this_exec_ctx == NULL) {
+ if (lock->next_combiner_on_this_exec_ctx == nullptr) {
exec_ctx->last_combiner = lock;
}
}
@@ -189,8 +189,8 @@ static void combiner_exec(grpc_exec_ctx* exec_ctx, grpc_closure* cl,
static void move_next(grpc_exec_ctx* exec_ctx) {
exec_ctx->active_combiner =
exec_ctx->active_combiner->next_combiner_on_this_exec_ctx;
- if (exec_ctx->active_combiner == NULL) {
- exec_ctx->last_combiner = NULL;
+ if (exec_ctx->active_combiner == nullptr) {
+ exec_ctx->last_combiner = nullptr;
}
}
@@ -209,7 +209,7 @@ static void queue_offload(grpc_exec_ctx* exec_ctx, grpc_combiner* lock) {
bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx* exec_ctx) {
GPR_TIMER_BEGIN("combiner.continue_exec_ctx", 0);
grpc_combiner* lock = exec_ctx->active_combiner;
- if (lock == NULL) {
+ if (lock == nullptr) {
GPR_TIMER_END("combiner.continue_exec_ctx", 0);
return false;
}
@@ -243,7 +243,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx* exec_ctx) {
gpr_mpscq_node* n = gpr_mpscq_pop(&lock->queue);
GRPC_COMBINER_TRACE(
gpr_log(GPR_DEBUG, "C:%p maybe_finish_one n=%p", lock, n));
- if (n == NULL) {
+ if (n == nullptr) {
// queue is in an inconsistent state: use this as a cue that we should
// go off and do something else for a while (and come back later)
GPR_TIMER_MARK("delay_busy", 0);
@@ -262,10 +262,10 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx* exec_ctx) {
GPR_TIMER_END("combiner.exec1", 0);
} else {
grpc_closure* c = lock->final_list.head;
- GPR_ASSERT(c != NULL);
+ GPR_ASSERT(c != nullptr);
grpc_closure_list_init(&lock->final_list);
int loops = 0;
- while (c != NULL) {
+ while (c != nullptr) {
GPR_TIMER_BEGIN("combiner.exec_1final", 0);
GRPC_COMBINER_TRACE(
gpr_log(GPR_DEBUG, "C:%p execute_final[%d] c=%p", lock, loops, c));