zephyr/kernel
Andy Ross 11a050b2c3 kernel/sched: Fix edge case in MetaIRQ preemption of cooperative threads
When a MetaIRQ preempts a cooperative thread, that thread would be
added back to the generic run queue.  When the MetaIRQ is done, the
highest priority thread will be selected to run, which may obviously
be a cooperative thread of a higher priority than the one that was
preempted.

But that's wrong, because the original thread was promised that it
would NOT be preempted until it reached a scheduling point on its own
(that's the whole point of a cooperative thread, of course).

We need to track the thread that got preempted (one per CPU) and
return to it instead of whatever else the scheduler might have found.

Fixes #20255

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-15 13:09:02 +01:00
..
include kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
atomic_c.c
CMakeLists.txt
compiler_stack_protect.c
device.c
errno.c
fatal.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
futex.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
idle.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
init.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
Kconfig kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
Kconfig.power_mgmt
mailbox.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
mem_domain.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
mem_slab.c
mempool.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
msg_q.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
mutex.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
pipes.c
poll.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
queue.c
sched.c kernel/sched: Fix edge case in MetaIRQ preemption of cooperative threads 2019-11-15 13:09:02 +01:00
sem.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
smp.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
stack.c
system_work_q.c
thread_abort.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
thread.c kernel: sychronize irq_offload() access 2019-11-08 15:16:43 -08:00
timeout.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
timer.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
userspace_handler.c
userspace.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
version.c
work_q.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00