zephyr/kernel/unified
Carles Cufi 9849df8c80 kernel: Disable interrupts after tick calculation in k_sleep()
To guarantee that the compiler does not reorder the execution of
irq_lock() with preceding operations, a volatile qualifier is
placed before the declaration of the ticks variable, which then
ensures that irq_lock() is executed after the tick calculation but
before accessing the ready and timeout queues.
Without the volatile keyword interrupts will be disabled during the
calculation of the ticks, which increases interrupt latency
significantly.

Change-Id: I2da82a1282e344f3b8d69e9457b36a4cb1d9ec18
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-12-08 16:37:51 +00:00
..
include kernel: remove K_TIMING thread flag 2016-11-26 14:04:18 +00:00
alert.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
atomic_c.c unified: move code from nanokernel into unified kernel 2016-10-10 00:46:40 +00:00
compiler_stack_protect.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
device.c kernel: deprecate old init levels 2016-11-09 17:59:44 +00:00
errno.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
event_logger.c kernel: Ensure event logger APIs convert timeouts to millseconds 2016-11-18 23:17:49 +00:00
fifo.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
idle.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
init.c kernel: replace .BSS and .DATA setup with standard library calls 2016-12-02 17:44:06 +00:00
int_latency_bench.c unified: move code from nanokernel into unified kernel 2016-10-10 00:46:40 +00:00
Kconfig kernel: add support for switching to main thread without _Swap() 2016-11-23 00:23:58 +00:00
kernel_event_logger.c kernel: Minor optimization to kernel event logger timestamping 2016-11-18 23:17:51 +00:00
legacy_offload.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
legacy_timer.c kernel: remove K_TIMING thread flag 2016-11-26 14:04:18 +00:00
lifo.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
mailbox.c kernel/mbox: add missing dummy thread timeout init 2016-11-23 00:27:43 +00:00
Makefile unified: dissociate system workqueue from common workqueue module 2016-11-04 22:39:54 +00:00
mem_pool.c kernel: Enhance naming of memory pool configuration options 2016-11-16 21:43:17 +00:00
mem_slab.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
msg_q.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
mutex.c kernel: fix obsolete access to fields in K_DEBUG() calls 2016-11-18 23:08:47 +00:00
pipes.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
sched.c kernel: Disable interrupts after tick calculation in k_sleep() 2016-12-08 16:37:51 +00:00
sem.c kernel: remove K_TIMING thread flag 2016-11-26 14:04:18 +00:00
stack.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
sys_clock.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
system_work_q.c kernel: deprecate old init levels 2016-11-09 17:59:44 +00:00
thread_abort.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
thread.c kernel: fix race condition when spawning a thread with a delay 2016-11-30 23:48:06 +00:00
timer.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
version.c unified: move code from nanokernel into unified kernel 2016-10-10 00:46:40 +00:00
work_q.c work_q: delayed work cancel returns incorrect status 2016-12-02 12:50:51 +00:00