nuttx/sched/misc
chenzhaoxiang 0d12f82074 sched/misc: fix incorrect mutex holder retrieval in assert backtrace
The dump_lockholder() function in assert.c was directly accessing themutex->holder
member variable to print the mutex holder's thread ID inthe backtrace log. This is
incorrect because the holder field is aprivate implementation detail of the mutex structure,
and the properAPI nxmutex_get_holder() should be used to retrieve the holder ID.

Using the public API ensures consistency with mutex state management,avoids potential issues
with future changes to the mutex structure'sinternal layout, and adheres to the kernel's
encapsulation principles.

This fix corrects the log output to show the accurate mutex holder IDwhen assertion failures
related to mutex locks occur, improving thedebuggability of lock-related issues.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-02-27 09:24:55 +08:00
..
assert.c sched/misc: fix incorrect mutex holder retrieval in assert backtrace 2026-02-27 09:24:55 +08:00
CMakeLists.txt coredump:Move coredump to sched/misc 2024-10-12 12:29:06 +08:00
coredump.c sched/misc: fix incomplete data emission in coredump elf_emit function 2026-02-26 14:44:16 +01:00
coredump.h coredump:Move private functions to internal header files 2024-10-12 12:29:06 +08:00
deadlock.c Clean up the nxmutex library 2025-05-08 16:00:05 +08:00
Make.defs coredump:Move coredump to sched/misc 2024-10-12 12:29:06 +08:00
panic_notifier.c spinlock: Fix compilation error with atomic.h. 2025-06-25 22:13:00 +08:00
reboot_notifier.c userspace: Exclude nuttx/arch.h 2024-11-01 16:59:37 +08:00