zephyr/kernel
Andy Ross c0ba11b281 kernel: Don't _arch_switch() to yourself
The SMP testing missed the case where _Swap() decides to return back
into the _current.  Obviously there is no valid switch handle for the
running thread into which we can restore, and everything blows up.
(What happened is that the new scheduler code opened up a spot where
k_thread_priority_set() does a _reschedule() unconditionally and
doens't check to see whether or not it's needed like the old code).

But that isn't incorrect!  It's entirely possible that _Swap() may
find that no thread is runnable except _current (due, for example, to
another CPU racing the other thread you expected off to sleep or
something).  Don't blow up, check and return a noop.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-05-19 07:00:55 +03:00
..
include kernel: Don't _arch_switch() to yourself 2018-05-19 07:00:55 +03:00
alert.c syscalls: remove policy from handler checks 2018-05-17 23:34:03 +03:00
atomic_c.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
CMakeLists.txt kernel: Cmake: Add __ZEPHYR_SUPERVISOR__ macro for kernel files. 2018-05-15 17:48:18 +03:00
compiler_stack_protect.c kernel: add CODE_UNREACHABLE in _StackCheckHandler 2018-04-17 10:50:12 -07:00
device.c kernel: device: Only compare strings if pointer comparison fails 2018-02-15 17:31:59 -08:00
errno.c kernel: errno: Use per-thread accessor function compatible with Newlib 2017-05-10 20:54:56 -04:00
idle.c kernel: Rework SMP irq_lock() compatibility layer 2018-05-02 10:00:17 -07:00
init.c kernel: Rework SMP irq_lock() compatibility layer 2018-05-02 10:00:17 -07:00
int_latency_bench.c Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
Kconfig doc: fix misspellings in doc and Kconfig files 2018-05-09 15:06:43 -05:00
Kconfig.event_logger kconfig: fix more help spacing issues 2018-02-15 23:20:55 -05:00
Kconfig.power_mgmt kconfig: fix more help spacing issues 2018-02-15 23:20:55 -05:00
mailbox.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
mem_domain.c kernel: mem_domain: Fix compile issues 2018-03-05 10:47:00 -06:00
mem_slab.c kernel: mem_slab: Reschedule in k_mem_slab_free only when necessary. 2018-05-18 20:16:50 +03:00
mempool.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
msg_q.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
mutex.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
pipes.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
poll.c k_poll: expose to user mode 2018-05-17 23:34:03 +03:00
queue.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
sched.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
sem.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
smp.c kernel: Rework SMP irq_lock() compatibility layer 2018-05-02 10:00:17 -07:00
stack.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
sys_clock.c syscalls: remove policy from handler checks 2018-05-17 23:34:03 +03:00
system_work_q.c kernel: introduce stack definition macros 2017-06-09 18:53:28 -04:00
thread_abort.c syscalls: remove policy from handler checks 2018-05-17 23:34:03 +03:00
thread.c syscalls: remove policy from handler checks 2018-05-17 23:34:03 +03:00
timer.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
userspace_handler.c syscalls: remove policy from handler checks 2018-05-17 23:34:03 +03:00
userspace.c userspace: generate list of kernel object sizes 2018-05-16 17:32:59 -07:00
version.c kernel: version: no need to store version in RAM 2017-09-07 16:34:50 -07:00
work_q.c work_q: Correctly clear pending flag in delayed work queue, update docs 2018-02-13 18:08:57 -05:00