zephyr/kernel/include
Andy Ross ab488277bc drivers/timer: Unify timeout setting APIs
The existing API had two almost identical functions: _set_time() and
_timer_idle_enter().  Both simply instruct the timer driver to set the
next timer interrupt expiration appropriately so that the call to
z_clock_announce() will be made at the requested number of ticks.  On
most/all hardware, these should be implementable identically.

Unfortunately because they are specified differently, existing drivers
have implemented them in parallel.

Specify a new, unified, z_clock_set_timeout().  Document it clearly
for implementors.  And provide a shim layer for legacy drivers that
will continue to use the old functions.

Note that this patch fixes an existing bug found by inspection: the
old call to _set_time() out of z_clock_announce() failed to test for
the "wait forever" case in the situation where clock_always_on is
true, meaning that a system that reached this point and then never set
another timeout would freeze its uptime clock incorrectly.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-10-16 15:03:10 -04:00
..
gen_offset.h headers: Fix headers guards 2018-09-17 15:49:26 -04:00
kernel_internal.h kernel: add a new API for setting thread names 2018-09-27 08:58:55 +05:30
kernel_offsets.h ld: Put 'sizeof(struct device)' in the generated offsets header 2018-09-18 16:23:40 +02:00
kernel_structs.h kernel: add a new API for setting thread names 2018-09-27 08:58:55 +05:30
ksched.h kernel: Explicitly comparing pointer with NULL 2018-09-28 06:28:41 +05:30
kswap.h headers: Fix headers guards 2018-09-17 15:49:26 -04:00
offsets_short.h headers: Fix headers guards 2018-09-17 15:49:26 -04:00
syscall_handler.h kernel: Fix overflow test problem introduced in 92ea2f9 2018-10-04 05:20:29 -07:00
timeout_q.h drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
wait_q.h headers: Fix headers guards 2018-09-17 15:49:26 -04:00