zephyr/kernel
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
..
configs kernel: disable INIT_STACKS by default 2016-11-24 16:37:01 +00:00
unified kernel: Disable interrupts after tick calculation in k_sleep() 2016-12-08 16:37:51 +00:00
Kconfig kernel: Eliminate use of KERNEL_V2 configuration option 2016-11-12 12:04:39 +00:00