zephyr/kernel
Andy Ross b0158cc81f kernel/sched: Fix reschedule points in SMP
There were two related bugs when in SMP mode:

1. Underneath z_reschedule(), the code was inexplicably checking the
   swap_ok flag on the current CPU to see if it was OK to preempt the
   current thread, but reschedule is the DEFINITION of a schedule
   point and we always want to swap, even if the current thread is
   non-preemptible.

2. With similar symptoms: in k_yield() a previous fix correct the
   queue handling for SMP, but it missed the case where a thread of
   the SAME priority as _current was on the queue and would fail to
   swap.  Yielding must always add the current thread to the back of
   the current priority.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-26 16:54:06 -04:00
..
include userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
atomic_c.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
CMakeLists.txt kernel: consolidate error handling code 2019-07-25 15:06:58 -07:00
compiler_stack_protect.c kernel: consolidate error handling code 2019-07-25 15:06:58 -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 userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
fatal.c kernel: remove z_fatal_print() 2019-09-12 05:17:39 -04:00
futex.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
idle.c tests/benchmarks: fix BOOT_TIME_MEASUREMENT 2019-09-21 16:43:26 -07:00
init.c tests/benchmarks: fix BOOT_TIME_MEASUREMENT 2019-09-21 16:43:26 -07:00
Kconfig tests: increase main stack size for x86 with ztest 2019-08-05 13:25:50 +02:00
Kconfig.power_mgmt power: modify HAS_STATE_SLEEP_ Kconfig options 2019-03-26 13:27:55 -04:00
mailbox.c cleanup: include/: move misc/dlist.h to sys/dlist.h 2019-06-27 22:55:49 -04:00
mem_domain.c userspace: adjust arch memory domain interface 2019-08-05 13:25:50 +02:00
mem_slab.c cleanup: include/: move misc/dlist.h to sys/dlist.h 2019-06-27 22:55:49 -04:00
mempool.c malloc: make sure returned memory is properly aligned 2019-07-03 14:17:29 -07:00
msg_q.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
mutex.c userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
pipes.c userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
poll.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
queue.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
sched.c kernel/sched: Fix reschedule points in SMP 2019-09-26 16:54:06 -04:00
sem.c userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
smp.c kernel/smp: Rename smp_init() 2019-06-05 17:15:55 -04:00
stack.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
system_work_q.c kernel: system_work_q: Set dedicated "sysworkq" name. 2018-10-19 07:58:45 -04:00
thread_abort.c userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
thread.c kernel/spinlock: Fix a SMP race condition of SPIN_VALIDATE 2019-09-26 16:51:38 -04:00
timeout.c userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
timer.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
userspace_handler.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
userspace.c userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
version.c doc: add kernel version API to doxygen 2018-12-08 17:24:53 -05:00
work_q.c kernel: Fix usage of CONFIG_SYS_CLOCK_EXISTS 2019-05-15 10:44:59 +02:00