diff options
author | 2016-02-18 07:31:39 -0800 | |
---|---|---|
committer | 2016-02-18 07:31:39 -0800 | |
commit | 311445fd32956e9383823400c82ce3fcd71b2b31 (patch) | |
tree | f9eb12e617b6eb81b47f8e1eb1a15ab15339bb5e /src | |
parent | 9dc184fd9531e5e584047c05c829897611af261d (diff) |
Fix tcp_client_posix_test
Diffstat (limited to 'src')
-rw-r--r-- | src/core/iomgr/timer.c | 4 | ||||
-rw-r--r-- | src/core/iomgr/timer.h | 8 | ||||
-rw-r--r-- | src/core/surface/completion_queue.c | 6 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/core/iomgr/timer.c b/src/core/iomgr/timer.c index 5e7fadb790..8379fffad0 100644 --- a/src/core/iomgr/timer.c +++ b/src/core/iomgr/timer.c @@ -335,8 +335,8 @@ static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, return (int)n; } -int grpc_timer_check(grpc_exec_ctx *exec_ctx, gpr_timespec now, - gpr_timespec *next) { +bool grpc_timer_check(grpc_exec_ctx *exec_ctx, gpr_timespec now, + gpr_timespec *next) { GPR_ASSERT(now.clock_type == g_clock_type); return run_some_expired_timers( exec_ctx, now, next, diff --git a/src/core/iomgr/timer.h b/src/core/iomgr/timer.h index 2f74b6e5d3..906255ddfb 100644 --- a/src/core/iomgr/timer.h +++ b/src/core/iomgr/timer.h @@ -89,7 +89,7 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer); /* iomgr internal api for dealing with timers */ /* Check for timers to be run, and run them. - Return non zero if timer callbacks were executed. + Return true if timer callbacks were executed. Drops drop_mu if it is non-null before executing callbacks. If next is non-null, TRY to update *next with the next running timer IF that timer occurs before *next current value. @@ -97,10 +97,10 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer); with high probability at least one thread in the system will see an update at any time slice. */ -int grpc_timer_check(grpc_exec_ctx* exec_ctx, gpr_timespec now, - gpr_timespec* next); +bool grpc_timer_check(grpc_exec_ctx *exec_ctx, gpr_timespec now, + gpr_timespec *next); void grpc_timer_list_init(gpr_timespec now); -void grpc_timer_list_shutdown(grpc_exec_ctx* exec_ctx); +void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx); /* the following must be implemented by each iomgr implementation */ diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index 6597c83cdc..de295ab941 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -335,7 +335,8 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, gpr_mu_lock(GRPC_POLLSET_MU(&cc->pollset)); continue; } - grpc_pollset_work(&exec_ctx, &cc->pollset, &worker, now, iteration_deadline); + grpc_pollset_work(&exec_ctx, &cc->pollset, &worker, now, + iteration_deadline); } GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret); GRPC_CQ_INTERNAL_UNREF(cc, "next"); @@ -451,7 +452,8 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, gpr_mu_lock(GRPC_POLLSET_MU(&cc->pollset)); continue; } - grpc_pollset_work(&exec_ctx, &cc->pollset, &worker, now, iteration_deadline); + grpc_pollset_work(&exec_ctx, &cc->pollset, &worker, now, + iteration_deadline); del_plucker(cc, tag, &worker); } done: |