aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/timer_uv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/iomgr/timer_uv.cc')
-rw-r--r--src/core/lib/iomgr/timer_uv.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/core/lib/iomgr/timer_uv.cc b/src/core/lib/iomgr/timer_uv.cc
index ccbbe357ae..df40e54ae6 100644
--- a/src/core/lib/iomgr/timer_uv.cc
+++ b/src/core/lib/iomgr/timer_uv.cc
@@ -35,16 +35,16 @@ grpc_tracer_flag grpc_timer_check_trace =
GRPC_TRACER_INITIALIZER(false, "timer_check");
}
-static void timer_close_callback(uv_handle_t *handle) { gpr_free(handle); }
+static void timer_close_callback(uv_handle_t* handle) { gpr_free(handle); }
-static void stop_uv_timer(uv_timer_t *handle) {
+static void stop_uv_timer(uv_timer_t* handle) {
uv_timer_stop(handle);
- uv_unref((uv_handle_t *)handle);
- uv_close((uv_handle_t *)handle, timer_close_callback);
+ uv_unref((uv_handle_t*)handle);
+ uv_close((uv_handle_t*)handle, timer_close_callback);
}
-void run_expired_timer(uv_timer_t *handle) {
- grpc_timer *timer = (grpc_timer *)handle->data;
+void run_expired_timer(uv_timer_t* handle) {
+ grpc_timer* timer = (grpc_timer*)handle->data;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
GRPC_UV_ASSERT_SAME_THREAD();
GPR_ASSERT(timer->pending);
@@ -54,10 +54,10 @@ void run_expired_timer(uv_timer_t *handle) {
grpc_exec_ctx_finish(&exec_ctx);
}
-void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
- grpc_millis deadline, grpc_closure *closure) {
+void grpc_timer_init(grpc_exec_ctx* exec_ctx, grpc_timer* timer,
+ grpc_millis deadline, grpc_closure* closure) {
uint64_t timeout;
- uv_timer_t *uv_timer;
+ uv_timer_t* uv_timer;
GRPC_UV_ASSERT_SAME_THREAD();
timer->closure = closure;
if (deadline <= grpc_exec_ctx_now(exec_ctx)) {
@@ -67,7 +67,7 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
}
timer->pending = 1;
timeout = (uint64_t)(deadline - grpc_exec_ctx_now(exec_ctx));
- uv_timer = (uv_timer_t *)gpr_malloc(sizeof(uv_timer_t));
+ uv_timer = (uv_timer_t*)gpr_malloc(sizeof(uv_timer_t));
uv_timer_init(uv_default_loop(), uv_timer);
uv_timer->data = timer;
timer->uv_timer = uv_timer;
@@ -75,27 +75,27 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
/* We assume that gRPC timers are only used alongside other active gRPC
objects, and that there will therefore always be something else keeping
the uv loop alive whenever there is a timer */
- uv_unref((uv_handle_t *)uv_timer);
+ uv_unref((uv_handle_t*)uv_timer);
}
-void grpc_timer_init_unset(grpc_timer *timer) { timer->pending = 0; }
+void grpc_timer_init_unset(grpc_timer* timer) { timer->pending = 0; }
-void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) {
+void grpc_timer_cancel(grpc_exec_ctx* exec_ctx, grpc_timer* timer) {
GRPC_UV_ASSERT_SAME_THREAD();
if (timer->pending) {
timer->pending = 0;
GRPC_CLOSURE_SCHED(exec_ctx, timer->closure, GRPC_ERROR_CANCELLED);
- stop_uv_timer((uv_timer_t *)timer->uv_timer);
+ stop_uv_timer((uv_timer_t*)timer->uv_timer);
}
}
-grpc_timer_check_result grpc_timer_check(grpc_exec_ctx *exec_ctx,
- grpc_millis *next) {
+grpc_timer_check_result grpc_timer_check(grpc_exec_ctx* exec_ctx,
+ grpc_millis* next) {
return GRPC_TIMERS_NOT_CHECKED;
}
-void grpc_timer_list_init(grpc_exec_ctx *exec_ctx) {}
-void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) {}
+void grpc_timer_list_init(grpc_exec_ctx* exec_ctx) {}
+void grpc_timer_list_shutdown(grpc_exec_ctx* exec_ctx) {}
void grpc_timer_consume_kick(void) {}