zephyr/kernel/include
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
..
gen_offset.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
kernel_internal.h kernel: internal APIs for thread resource pools 2018-05-16 17:32:59 -07:00
kernel_offsets.h kernel: SMP-aware scheduler 2018-02-16 10:44:29 -05:00
kernel_structs.h kernel: SMP-aware scheduler 2018-02-16 10:44:29 -05:00
ksched.h kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
kswap.h kernel: Don't _arch_switch() to yourself 2018-05-19 07:00:55 +03:00
offsets_short.h kernel/arch: streamline thread user options 2017-01-24 13:34:50 +00:00
syscall_handler.h syscalls: remove policy from handler checks 2018-05-17 23:34:03 +03:00
timeout_q.h kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
wait_q.h kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00