aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/timer_generic.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-03-16 16:25:12 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-03-16 16:25:12 -0700
commit7b2dd93362099eef75b49fe33b93692bb148b93f (patch)
tree550d87c1a8ba64d4728e1a00bc97ac35686c32a0 /src/core/lib/iomgr/timer_generic.h
parentda73580d2c61134529d31651cc18584ac5924227 (diff)
Track milliseconds since process start in timer heap
Allows reducing a lock-then-check to an atomic load and check on the fast path of timer checks. Reduces locks per RPC by about 5.
Diffstat (limited to 'src/core/lib/iomgr/timer_generic.h')
-rw-r--r--src/core/lib/iomgr/timer_generic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/timer_generic.h b/src/core/lib/iomgr/timer_generic.h
index 1608dce9fb..c79a431aa0 100644
--- a/src/core/lib/iomgr/timer_generic.h
+++ b/src/core/lib/iomgr/timer_generic.h
@@ -38,7 +38,7 @@
#include "src/core/lib/iomgr/exec_ctx.h"
struct grpc_timer {
- gpr_timespec deadline;
+ gpr_atm deadline;
uint32_t heap_index; /* INVALID_HEAP_INDEX if not in heap */
bool pending;
struct grpc_timer *next;