zephyr/kernel/include
Andy Ross 6b84ab3830 kernel/sched: Adjust locking in z_swap()
Swap was originally written to use the scheduler lock just to select a
new thread, but it would be nice to be able to rely on scheduler
atomicity later in the process (in particular it would be nice if the
assignment to cpu.current could be seen atomically).  Rework the code
a bit so that swap takes the lock itself and holds it until just
before the call to arch_switch().

Note that the local interrupt mask has always been required to be held
across the swap, so extending the lock here has no effect on latency
at all on uniprocessor setups, and even on SMP only affects average
latency and not worst case.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-02-24 16:39:15 -05:00
..
gen_offset.h aarch64: Use absolute symbols for the callee saved registers 2020-11-17 18:59:23 -05:00
kernel_arch_interface.h include/kernel_arch_interface.h: Redocument arch_switch() 2021-02-14 16:22:45 -05:00
kernel_internal.h kernel: Move LOCKED() macro to kernel_internal.h 2021-02-22 14:56:37 -05:00
kernel_offsets.h device: add post-process of elf file to manage device handles 2021-02-19 15:46:16 -05:00
kernel_tls.h kernel: tls: align tdata/tbss sections in stack 2021-02-07 23:28:43 -05:00
ksched.h kernel/sched: Adjust locking in z_swap() 2021-02-24 16:39:15 -05:00
kswap.h kernel/sched: Adjust locking in z_swap() 2021-02-24 16:39:15 -05:00
mmu.h kernel: add CONFIG_SRAM_OFFSET 2021-02-22 14:55:28 -05:00
offsets_short.h kernel: add common bits to support TLS 2020-10-24 10:52:00 -07:00