zephyr/kernel/include
Andy Ross 6f13980fc7 kernel/mutex: Fix locking to be SMP-safe
The mutex locking was written to use k_sched_lock(), which doesn't
work as a synchronization primitive if there is another CPU running
(it prevents the current CPU from preempting the thread, it says
nothing about what the others are doing).

Use the pre-existing spinlock for all synchronization.  One wrinkle is
that the priority code was needing to call z_thread_priority_set(),
which is a rescheduling call that cannot be called with a lock held.
So that got split out with a low level utility that can update the
schedule state but allow the caller to defer yielding until later.

Fixes #17584

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-08-22 17:58:16 -04:00
..
gen_offset.h
kernel_internal.h userspace: adjust arch memory domain interface 2019-08-05 13:25:50 +02:00
kernel_offsets.h kernel: offsets: exclude from coverage 2019-06-25 17:22:34 -07:00
kernel_structs.h Includes: #ifdef CONFIG_USE_SWITCH instead of #if to avoid undef warning 2019-07-14 04:58:47 -07:00
ksched.h kernel/mutex: Fix locking to be SMP-safe 2019-08-22 17:58:16 -04:00
kswap.h
offsets_short.h
syscall_handler.h userspace: minor typo fixes in various places 2019-07-02 19:18:48 -04:00
timeout_q.h
wait_q.h cleanup: include/: move misc/rb.h to sys/rb.h 2019-06-27 22:55:49 -04:00