zephyr/include
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
..
app_memory subsys: app_memory: Fixed the size calculation for power of 2 MPUs 2018-09-20 11:25:53 -04:00
arch Revert "linker: allow SoC to insert linker script fragments" 2018-10-14 12:14:04 -04:00
audio headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
bluetooth bluetooth: host: conn: Add const to addr in bt_le_set_auto_conn 2018-10-08 20:31:39 -04:00
cmsis_rtos_v1 headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
crypto headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
debug kernel: Using boolean types for boolean constants 2018-09-28 06:28:41 +05:30
dfu headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
display subsys: add monochrome character framebuffer 2018-10-16 14:54:47 -04:00
drivers drivers: console: native: header fix 2018-10-15 09:36:37 -04:00
dt-bindings gpio: remove unused GPIO_INT_CLOCK_SYNC flag 2018-10-03 08:23:24 -05:00
fs headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
linker subsys: add monochrome character framebuffer 2018-10-16 14:54:47 -04:00
logging logging: Add autostart option to LOG_BACKEND_DEFINE 2018-10-11 13:29:50 +03:00
mgmt headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
misc portability: Remove C99-illegal semicolons from the global scope 2018-09-28 07:57:28 +05:30
net net: socket.h: Add more BSD defines for getaddrinfo() 2018-10-12 13:06:53 +03:00
nvs headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
posix include: posix: time: Explicitly include from <posix/...> 2018-10-09 08:19:44 -04:00
random headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
settings headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
shell logging: Add autostart option to LOG_BACKEND_DEFINE 2018-10-11 13:29:50 +03:00
toolchain kernel: Using boolean types for boolean constants 2018-09-28 06:28:41 +05:30
usb usb: Use always single callback definition 2018-10-10 09:21:55 -04:00
zephyr headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
adc.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
aio_comparator.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
atomic.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
base64.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
cache.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
can.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
clock_control.h kernel: Using boolean expression on ASSERT macros 2018-09-28 06:28:41 +05:30
console.h subsys: console: Split serial tty handling to a separate module 2018-10-03 16:40:49 +02:00
counter.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
crc8.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
crc16.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
crc32.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
device.h kernel: Remove unused variables 2018-09-28 07:58:19 +05:30
disk_access.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
display.h include: display: expand api for monochrome displays 2018-10-16 14:54:47 -04:00
dma.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
entropy.h kernel: Using boolean expression on ASSERT macros 2018-09-28 06:28:41 +05:30
exc_handle.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
fcb.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
flash_map.h subsys: storage: flash_map: add API for check flash driver support 2018-09-27 16:24:21 +02:00
flash.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
fs.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
gpio.h gpio: Remove deprecated macros 2018-10-02 12:50:56 -05:00
i2c.h c++: Fix compilation of C++ file that includes i2c.h 2018-09-21 18:49:52 -04:00
i2s.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
init.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ipm.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
irq_nextlevel.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
irq_offload.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
irq.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
json.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
kernel_includes.h kernel.h: Header hygine, move clock/timer handling 2018-10-16 15:03:10 -04:00
kernel_version.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
kernel.h sys_clock: Make clock_always_on true by default 2018-10-16 15:03:10 -04:00
led_strip.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
led.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
pinmux.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
power.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ptp_clock.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
pwm.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ring_buffer.h lib: ring_buffer: add raw byte access mode 2018-10-09 13:58:44 -04:00
rtc.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
sched_priq.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
sensor.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
shared_irq.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
spi.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
spinlock.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
stats.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
sw_isr_table.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
sys_clock.h sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
sys_io.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
syscall.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
toolchain.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
tracing.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
uart.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
watchdog.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
zephyr.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00