sched/signal: Add support for partially disabling signals

Signals in NuttX serve two primary purposes:

    1. Synchronization and wake-up:
    Signals can be used to block threads on specific signal sets and later
    wake them up by delivering the corresponding signals to those threads.

    2. Asynchronous notification:
    Signals can also be used to install callback handlers for specific signals, allowing threads to
    asynchronously invoke those handlers when the signals are delivered.

This change introduces the ability to partially disable signal functionality: to disable only signal functions for
Asynchronous notification, keeping functions for Synchronization and wake-up.
This enables finer-grained control over signal usage while preserving existing behavior for supported use cases.

Co-authored-by: Guo Shichao guoshichao@xiaomi.com
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
This commit is contained in:
wangchengdong
2026-01-11 20:44:45 +08:00
committed by Alan C. Assis
parent ac3d964973
commit 0ea686bc5b
21 changed files with 159 additions and 68 deletions
+3 -3
View File
@@ -173,10 +173,10 @@
"shmdt","sys/shm.h","defined(CONFIG_MM_SHM)","int","FAR const void *"
"shmget","sys/shm.h","defined(CONFIG_MM_SHM)","int","key_t","size_t","int"
"shutdown","sys/socket.h","defined(CONFIG_NET)","int","int","int"
"sigaction","signal.h","","int","int","FAR const struct sigaction *","FAR struct sigaction *"
"signal","signal.h","","_sa_handler_t","int","_sa_handler_t"
"sigaction","signal.h","defined(CONFIG_ENABLE_ALL_SIGNALS)","int","int","FAR const struct sigaction *","FAR struct sigaction *"
"signal","signal.h","defined(CONFIG_ENABLE_ALL_SIGNALS)","_sa_handler_t","int","_sa_handler_t"
"signalfd","sys/signalfd.h","defined(CONFIG_SIGNAL_FD)","int","int","FAR const sigset_t *","int"
"sigpending","signal.h","","int","FAR sigset_t *"
"sigpending","signal.h","defined(CONFIG_ENABLE_ALL_SIGNALS)","int","FAR sigset_t *"
"sigprocmask","signal.h","","int","int","FAR const sigset_t *","FAR sigset_t *"
"sigqueue","signal.h","","int","int","int","union sigval|FAR void *|sival_ptr"
"sigsuspend","signal.h","","int","FAR const sigset_t *"
1 _assert assert.h void FAR const char * int FAR const char * FAR void *
173 shmdt sys/shm.h defined(CONFIG_MM_SHM) int FAR const void *
174 shmget sys/shm.h defined(CONFIG_MM_SHM) int key_t size_t int
175 shutdown sys/socket.h defined(CONFIG_NET) int int int
176 sigaction signal.h defined(CONFIG_ENABLE_ALL_SIGNALS) int int FAR const struct sigaction * FAR struct sigaction *
177 signal signal.h defined(CONFIG_ENABLE_ALL_SIGNALS) _sa_handler_t int _sa_handler_t
178 signalfd sys/signalfd.h defined(CONFIG_SIGNAL_FD) int int FAR const sigset_t * int
179 sigpending signal.h defined(CONFIG_ENABLE_ALL_SIGNALS) int FAR sigset_t *
180 sigprocmask signal.h int int FAR const sigset_t * FAR sigset_t *
181 sigqueue signal.h int int int union sigval|FAR void *|sival_ptr
182 sigsuspend signal.h int FAR const sigset_t *