summaryrefslogtreecommitdiff
path: root/include/drivers/system_timer.h
diff options
context:
space:
mode:
authorBenjamin Walsh <benjamin.walsh@windriver.com>2015-06-14 18:12:14 -0400
committerAnas Nashif <anas.nashif@intel.com>2016-02-05 20:14:22 -0500
commit617f9c5b4c2e95d20dbaf6fa0ab8525b45bc5120 (patch)
tree7ad87c64766033497a2830ee616f713b530655c8 /include/drivers/system_timer.h
parent101fee8dde4cff091fa7eaef7ae61a753478ef8c (diff)
nanokernel: allow nano time tracking to be used in microkernels
The nanokernel time tracking code (ticker) can now exist in microkernel systems. This allows the ticker that drives nano timers and timeouts to advance the tick count for these in a microkernel, thus allow their presence there. Previously, nano timers could not be used in a microkernel. Change-Id: I17f2b659691a081b0f9bf3961ed030533aa02a15 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Diffstat (limited to 'include/drivers/system_timer.h')
-rw-r--r--include/drivers/system_timer.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/drivers/system_timer.h b/include/drivers/system_timer.h
index 736b789e0..762c2f3f3 100644
--- a/include/drivers/system_timer.h
+++ b/include/drivers/system_timer.h
@@ -64,11 +64,18 @@ extern void _timer_idle_enter(int32_t ticks);
extern void _timer_idle_exit(void);
#endif /* TIMER_SUPPORTS_TICKLESS */
+extern uint32_t _nano_get_earliest_deadline(void);
+
+#if defined(CONFIG_NANO_TIMEOUTS) || defined(CONFIG_NANO_TIMERS)
+ extern void _nano_sys_clock_tick_announce(uint32_t ticks);
+#else
+ #define _nano_sys_clock_tick_announce(ticks) do { } while((0))
+#endif
+
#ifdef CONFIG_MICROKERNEL
#define _sys_clock_tick_announce() \
nano_isr_stack_push(&_k_command_stack, TICK_EVENT)
#else
- extern void _nano_sys_clock_tick_announce(uint32_t ticks);
extern uint32_t _sys_idle_elapsed_ticks;
#define _sys_clock_tick_announce() \
_nano_sys_clock_tick_announce(_sys_idle_elapsed_ticks)