Add Kernel::get_ms_count
Give C++ access to the RTOS's absolute timebase, reducing the need to
run private Timers and similar. Allows wait_until functionality, and
makes it easier to avoid time drift.

Place it in a new header and namespace in case we want more kernel
functions in future.

Try to cover over the breaking API change potentially upcoming in
CMSIS-RTOS 2.1.1, when it reduces the tick count from 64-bit to 32-bit.
(See https://github.com/ARM-software/CMSIS_5/issues/277)

Explicitly state that ticks are milliseconds in mbed OS, despite CMSIS
RTOS 2 permitting different tick rates.

See also https://github.com/ARMmbed/mbed-os/pull/3648 (wait_until
for condition variables) and
https://github.com/ARMmbed/mbed-os/issues/5378 (EventQueue should
use RTOS tick count).
ls
1 parent 3c793a7 commit 4d3888c06a046220f43663ae45c823cfd11df563
@Kevin Bracey Kevin Bracey authored on 2 Nov 2017
Showing 3 changed files
View
rtos/Kernel.cpp 0 → 100644
View
rtos/Kernel.h 0 → 100644
View
rtos/rtos.h