aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/iomgr/timer.h')
-rw-r--r--src/core/iomgr/timer.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/core/iomgr/timer.h b/src/core/iomgr/timer.h
index 720c9d5ab9..9ad1e92f42 100644
--- a/src/core/iomgr/timer.h
+++ b/src/core/iomgr/timer.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -86,4 +86,24 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
Requires: cancel() must happen after add() on a given timer */
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 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.
+ *next is never guaranteed to be updated on any given execution; however,
+ with high probability at least one thread in the system will see an update
+ at any time slice. */
+
+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);
+
+/* the following must be implemented by each iomgr implementation */
+
+void grpc_kick_poller(void);
+
#endif /* GRPC_INTERNAL_CORE_IOMGR_TIMER_H */