zephyr/drivers/timer
Andy Ross 317178b88f sys_clock: Fix unsafe tick count usage
The system tick count is a 64 bit quantity that gets updated from
interrupt context, meaning that it's dangerously non-atomic and has to
be locked.  The core kernel clock code did this right.

But the value was also exposed to the rest of the universe as a global
variable, and virtually nothing else was doing this correctly.  Even
in the timer ISRs themselves, the interrupts may be themselves
preempted (most of our architectures support nested interrupts) by
code that wants to set timeouts and inspect system uptime.

Define a z_tick_{get,set}() API, eliminate the old variable, and make
sure everyone uses the right mechanism.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-10-16 15:03:10 -04:00
..
altera_avalon_timer_hal.c sys_clock: Make sys_clock_hw_cycles_per_tick() a proper API 2018-10-16 15:03:10 -04:00
arcv2_timer0.c sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
CMakeLists.txt board: posix: add native_posix board definition 2017-12-27 14:16:08 -05:00
cortex_m_systick.c sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
hpet.c sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
Kconfig drivers: timer nRF: simplify kconfig depend 2018-10-15 09:36:37 -04:00
loapic_timer.c sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
native_posix_timer.c sys_clock.h: Remove sys_clock_ticks_per_sec() 2018-10-16 15:03:10 -04:00
nrf_rtc_timer.c sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
pulpino_timer.c sys_clock: Make sys_clock_hw_cycles_per_tick() a proper API 2018-10-16 15:03:10 -04:00
riscv_machine_timer.c sys_clock: Make sys_clock_hw_cycles_per_tick() a proper API 2018-10-16 15:03:10 -04:00
sys_clock_init.c drivers: timer: init earlier in boot sequence 2017-07-10 11:44:56 -07:00
xtensa_sys_timer.c sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00