mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 09:12:44 +00:00
Use a subsystem lock, not a per-object lock. Really we want to lock at mutex granularity where possible, but (1) that has non-trivial memory overhead vs. e.g. directly spinning on the mutex state and (2) the locking in a few places was originally designed to protect access to the mutex *owner* priority, which is not 1:1 with a single mutex. Basically the priority-inheriting mutex code will need some rework before it works as a fine-grained locking abstraction in SMP. Note that this fixes an invisible bug: with the older code, k_mutex_unlock() would actually call irq_unlock() twice along the path where there was a new owner, which is benign on existing architectures (so long as the key argument is unchanged) but was never guaranteed to work. With a spinlock, unlocking an unlocked/unowned lock is a detectable assertion condition. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
---|---|---|
.. | ||
include | ||
atomic_c.c | ||
CMakeLists.txt | ||
compiler_stack_protect.c | ||
device.c | ||
errno.c | ||
idle.c | ||
init.c | ||
int_latency_bench.c | ||
Kconfig | ||
Kconfig.power_mgmt | ||
mailbox.c | ||
mem_domain.c | ||
mem_slab.c | ||
mempool.c | ||
msg_q.c | ||
mutex.c | ||
pipes.c | ||
poll.c | ||
queue.c | ||
sched.c | ||
sem.c | ||
smp.c | ||
stack.c | ||
system_work_q.c | ||
thread_abort.c | ||
thread.c | ||
timeout.c | ||
timer.c | ||
userspace_handler.c | ||
userspace.c | ||
version.c | ||
work_q.c |