zephyr/tests
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
..
application_development tests: Fix sanity_check 2018-10-10 09:21:55 -04:00
benchmarks sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
bluetooth shell: create instances automatically basing on enabled backend 2018-10-11 12:08:04 +02:00
boards xtensa: intel_s1000: Move some functions to SoC level SYS_INIT 2018-10-12 07:52:17 -04:00
booting/stub cmake: Prepend 'cmake_minimum_required()' into 'app' build scripts 2018-08-15 04:06:50 -07:00
cmsis_rtos_v1 lib/cmsis_rtos_v1: Fix some Kconfig inconsistencies 2018-10-02 14:08:33 -07:00
compliance
crypto tests: fix test identifier 2018-10-16 09:17:51 -04:00
drivers drivers: sensor: Migrate to new logger 2018-10-16 08:49:53 -04:00
include shell: Rename shell to legacy_shell 2018-09-19 09:30:29 -04:00
kernel sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
lib tests: lib: mem_alloc: Blacklist all POSIX arch boards 2018-10-15 09:36:37 -04:00
misc/test_build tests/samples: rename 'app' tag to something meaningful 2018-10-16 09:17:51 -04:00
net net: Remove obsolete config options from samples and tests 2018-10-11 14:44:14 -04:00
posix tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
power tests: pm -> powermanagement 2018-10-16 09:17:51 -04:00
shell shell: Rename shell to legacy_shell 2018-09-19 09:30:29 -04:00
subsys tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
unit cmake: Prepend 'cmake_minimum_required()' into 'app' build scripts 2018-08-15 04:06:50 -07:00
ztest sys_clock.h: Make "global variable" APIs into proper functions 2018-10-16 15:03:10 -04:00
CMakeLists.txt tests: add CONFIG_TEST for marking tests 2018-01-08 10:03:57 -05:00
Kconfig Kconfig: Use the first default with a satisfied condition 2018-08-10 12:38:28 -07:00