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> |
||
|---|---|---|
| .. | ||
| gen_offset.h | ||
| kernel_arch_interface.h | ||
| kernel_internal.h | ||
| kernel_offsets.h | ||
| kernel_tls.h | ||
| ksched.h | ||
| kswap.h | ||
| mmu.h | ||
| offsets_short.h | ||