nuttx/libs/libc
chenzhaoxiang 3fb1a40a4b libs/libc: add configurable skip count for mutex backtrace addresses
This commit introduces a new Kconfig option LIBC_MUTEX_BACKTRACE_SKIP tocontrol the
number of initial addresses skipped when generating mutex backtraces.

Key changes:
1. Add LIBC_MUTEX_BACKTRACE_SKIP Kconfig entry (depends on
LIBC_MUTEX_BACKTRACE > 0), defaulting to 2. This option lets users configure
how many leading addresses are omitted from the mutex backtrace output.

2. Modify the nxmutex_add_backtrace() function to pass the new config value
as the skip parameter to sched_backtrace(), replacing the hardcoded 0.

This enhancement improves the usability of mutex backtraces by allowing removalof uninformative
initial stack frames (e.g., backtrace helper functions ormutex acquisition wrappers), making the
relevant call stack entries more visiblefor debugging lock-related issues.

The default value (2) maintains sensibleout-of-the-box behavior while enabling customization for specific use cases.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-02-27 19:54:37 +08:00
..
aio style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
assert lib_stackchk.c: a duplicate implementation error reported during compilation 2026-02-02 13:22:07 +08:00
audio libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
builtin libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
ctype style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
dirent cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
dlfcn libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
elf cmake(feat):define elf option and enable apps module build 2026-01-19 14:45:37 +08:00
errno libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
eventfd libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
fdt libs/libc/fdt/Make.defs: cannot move due to directory not empty bugfix 2024-10-09 15:42:17 +08:00
fixedmath libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
gdbstub arch/arm64: fix backtrace register access and gdbstub config guard 2026-01-16 08:55:47 -03:00
gnssutils libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
grp libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
hex2bin stream_getc: use lib_stream_eof instead of EOF 2024-11-26 10:25:36 +08:00
inttypes libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
libgen libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
locale style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
lzf libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
machine libs/libc/machine/arm: add Cortex-M0/M23 support to arch_mcount 2026-02-04 03:03:45 +08:00
misc libs/libc: add configurable skip count for mutex backtrace addresses 2026-02-27 19:54:37 +08:00
net libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
netdb libc/netdb: avoid unnecessary DNS notify if nameserver exists 2026-01-15 16:20:44 -03:00
obstack libs/libc/obstack/lib_obstack_free.c: fix object check within chunk 2025-12-13 18:13:19 -03:00
pthread libs/pthread: disable pthread_kill when no signals 2026-02-26 20:03:05 +08:00
pwd libs/libc/unistd: add getspnam function 2024-10-16 11:15:25 +08:00
queue libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
regex libs/libc/regex: remove logically dead code in regcomp.c 2026-01-24 19:28:56 +08:00
sched sched/cancelpt: Fix MISRA C 2012 Rule 10.4 violations 2026-02-02 21:09:40 +08:00
search libc/search: add foreach api for hcreate_data 2025-12-25 09:39:03 +08:00
semaphore pthread: move pthread_cond to userspace 2026-01-26 16:26:39 +08:00
signal sched/signal: Add support for disabling all signal functions 2026-01-18 08:24:13 -03:00
spawn cmake:add lib_psa_set/getstackaddr file to CMakeLists.txt 2026-02-03 14:40:00 +01:00
stdio freopen: fix fdsan report error 2026-01-15 22:58:17 +08:00
stdlib libc: Add Kconfig option to disable hex-string to float parsing 2026-01-08 02:37:21 +08:00
stream libc/syslograwstream: Use memrchr to locate the newline character 2026-01-01 17:03:50 +08:00
string libc_bsd:add missing SPDX-License 2026-02-04 03:02:04 +08:00
symtab lib_libvsprintf.c:add option in Kconfig to control "%p*" special format specifier. 2024-10-15 15:33:13 +08:00
syslog drivers/syslog: Add RFC 5424 protocol support 2025-06-13 20:26:57 +08:00
termios libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
time libc/localtime: rename offsetp to poffset 2025-12-19 13:46:21 -05:00
tls libc/tls: update preprocessor condition comment to match implementation 2026-01-31 02:49:10 +08:00
uio move readv/writev to the kernel 2024-10-30 17:07:54 +08:00
unistd libs/libc: replace critical section with spinlock in hostname operations 2026-01-17 14:13:07 +08:00
userfs style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
uuid libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
wchar style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
wctype libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
wqueue wqueue: fix the config typo error 2026-01-14 09:24:00 +08:00
zoneinfo Makefile: Remove make depend files by make distclean 2026-02-16 16:27:57 +01:00
.gitignore libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
CMakeLists.txt libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
Kconfig libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
libc.csv sched/signal: Add support for disabling all signal functions 2026-01-18 08:24:13 -03:00
libc.h libc/machine:Add prefixes to libc functions implemented by arch 2024-10-31 18:11:16 +08:00
Makefile Makefile: Remove make depend files by make distclean 2026-02-16 16:27:57 +01:00