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 kernel: fix the bug in atomic_c.c 2019-09-26 21:13:20 -04:00
CMakeLists.txt headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
compiler_stack_protect.c kernel: Fix gcc-9.2 warning with _StackCheckHandler 2019-10-04 05:22:30 -07:00
device.c [Code coverage]: Fix the issue of function code coverage in device.c. 2019-09-17 12:35:30 +08:00
errno.c headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
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 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
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 kernel: rename thread return value functions 2019-09-30 15:25:55 -04:00
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 headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
poll.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
queue.c kernel: rename thread return value functions 2019-09-30 15:25:55 -04:00
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 kernel: rename thread return value functions 2019-09-30 15:25:55 -04:00
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 kernel: remove vestigal printk references 2019-10-01 16:15:06 -05:00
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