zephyr/arch/arc/core
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
..
mpu arch: setup logging using new logger 2018-10-08 17:49:12 -04:00
offsets arch: arc: refactor the arc stack check support 2018-06-04 13:31:43 -04:00
atomic.S linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
cache.c kernel: include: rename nano_internal.h to kernel_internal.h 2018-01-31 10:07:21 -06:00
CMakeLists.txt arch: arm: add_subdirectory shouldn't depend on a hidden kconfig. 2018-05-28 13:23:13 -04:00
cpu_idle.S systemview: add support natively using tracing hooks 2018-08-21 05:45:47 -07:00
fast_irq.S arch: arc: enable stack check when arc is in secure mode 2018-08-22 07:57:11 -07:00
fatal.c arch: Add LOG_PANIC to fault handlers 2018-09-27 13:11:26 +05:30
fault_s.S arch: arc: stack check will be disabled in exception 2018-08-22 07:57:11 -07:00
fault.c arch: Add LOG_PANIC to fault handlers 2018-09-27 13:11:26 +05:30
irq_manage.c irq: Fix irq_lock api usage 2018-08-16 19:47:41 -07:00
irq_offload.c irq: Fix irq_lock api usage 2018-08-16 19:47:41 -07:00
isr_wrapper.S systemview: add support natively using tracing hooks 2018-08-21 05:45:47 -07:00
prep_c.c kernel: include: rename nano_internal.h to kernel_internal.h 2018-01-31 10:07:21 -06:00
regular_irq.S arch: arc: enable stack check when arc is in secure mode 2018-08-22 07:57:11 -07:00
reset.S arch: arc: improve the reset code 2018-06-08 16:37:22 -05:00
swap.S arch: arc: put the init context into privileged stack 2018-08-22 07:57:11 -07:00
sys_fatal_error_handler.c arch: arc: STACK_CHECK_FAIL of STACK_CHECK not hang the system 2018-06-08 16:37:22 -05:00
thread_entry_wrapper.S arch: arc: add user space support for arc 2018-02-16 12:20:16 +01:00
thread.c arch: arc: put the init context into privileged stack 2018-08-22 07:57:11 -07:00
timestamp.c sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
userspace.S arch: arc: put the init context into privileged stack 2018-08-22 07:57:11 -07:00
vector_table.c arch: convert to using newly introduced integer sized types 2017-04-21 12:08:12 +00:00