summaryrefslogtreecommitdiff
path: root/grpc/src/core/lib/iomgr/exec_ctx.cc
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/src/core/lib/iomgr/exec_ctx.cc')
-rw-r--r--grpc/src/core/lib/iomgr/exec_ctx.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/grpc/src/core/lib/iomgr/exec_ctx.cc b/grpc/src/core/lib/iomgr/exec_ctx.cc
index 18d0aae4..54ab9fda 100644
--- a/grpc/src/core/lib/iomgr/exec_ctx.cc
+++ b/grpc/src/core/lib/iomgr/exec_ctx.cc
@@ -27,7 +27,7 @@
#include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/profiling/timers.h"
-static void exec_ctx_run(grpc_closure* closure, grpc_error* error) {
+static void exec_ctx_run(grpc_closure* closure, grpc_error_handle error) {
#ifndef NDEBUG
closure->scheduled = false;
if (grpc_trace_closure.enabled()) {
@@ -46,7 +46,7 @@ static void exec_ctx_run(grpc_closure* closure, grpc_error* error) {
GRPC_ERROR_UNREF(error);
}
-static void exec_ctx_sched(grpc_closure* closure, grpc_error* error) {
+static void exec_ctx_sched(grpc_closure* closure, grpc_error_handle error) {
grpc_closure_list_append(grpc_core::ExecCtx::Get()->closure_list(), closure,
error);
}
@@ -58,7 +58,9 @@ static grpc_millis timespan_to_millis_round_down(gpr_timespec ts) {
double x = GPR_MS_PER_SEC * static_cast<double>(ts.tv_sec) +
static_cast<double>(ts.tv_nsec) / GPR_NS_PER_MS;
if (x < 0) return 0;
- if (x > GRPC_MILLIS_INF_FUTURE) return GRPC_MILLIS_INF_FUTURE;
+ if (x > static_cast<double>(GRPC_MILLIS_INF_FUTURE)) {
+ return GRPC_MILLIS_INF_FUTURE;
+ }
return static_cast<grpc_millis>(x);
}
@@ -72,7 +74,9 @@ static grpc_millis timespan_to_millis_round_up(gpr_timespec ts) {
static_cast<double>(GPR_NS_PER_SEC - 1) /
static_cast<double>(GPR_NS_PER_SEC);
if (x < 0) return 0;
- if (x > GRPC_MILLIS_INF_FUTURE) return GRPC_MILLIS_INF_FUTURE;
+ if (x > static_cast<double>(GRPC_MILLIS_INF_FUTURE)) {
+ return GRPC_MILLIS_INF_FUTURE;
+ }
return static_cast<grpc_millis>(x);
}
@@ -148,7 +152,7 @@ bool ExecCtx::Flush() {
closure_list_.head = closure_list_.tail = nullptr;
while (c != nullptr) {
grpc_closure* next = c->next_data.next;
- grpc_error* error = c->error_data.error;
+ grpc_error_handle error = c->error_data.error;
did_something = true;
exec_ctx_run(c, error);
c = next;
@@ -170,7 +174,7 @@ grpc_millis ExecCtx::Now() {
}
void ExecCtx::Run(const DebugLocation& location, grpc_closure* closure,
- grpc_error* error) {
+ grpc_error_handle error) {
(void)location;
if (closure == nullptr) {
GRPC_ERROR_UNREF(error);