sched/signal: Add support for disabling all signal functions

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  disable all signal functionality to reduce footprint for NuttX.

Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
This commit is contained in:
wangchengdong 2026-01-12 09:11:52 +08:00 committed by Alan C. Assis
parent 0ea686bc5b
commit faf864b04f
19 changed files with 104 additions and 53 deletions

View file

@ -105,10 +105,10 @@
"pipe2","unistd.h","defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0","int","int [2]|FAR int *","int"
"poll","poll.h","","int","FAR struct pollfd *","nfds_t","int"
"posix_spawn","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS)","int","FAR pid_t *","FAR const char *","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char * const []|FAR char * const *","FAR char * const []|FAR char * const *"
"ppoll","poll.h","","int","FAR struct pollfd *","nfds_t","FAR const struct timespec *","FAR const sigset_t *"
"ppoll","poll.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR struct pollfd *","nfds_t","FAR const struct timespec *","FAR const sigset_t *"
"prctl","sys/prctl.h","","int","int","...","uintptr_t","uintptr_t"
"pread","unistd.h","","ssize_t","int","FAR void *","size_t","off_t"
"pselect","sys/select.h","","int","int","FAR fd_set *","FAR fd_set *","FAR fd_set *","FAR const struct timespec *","FAR const sigset_t *"
"pselect","sys/select.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","int","FAR fd_set *","FAR fd_set *","FAR fd_set *","FAR const struct timespec *","FAR const sigset_t *"
"pthread_cancel","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t"
"pthread_cond_broadcast","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_cond_t *"
"pthread_cond_clockwait","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_cond_t *","FAR pthread_mutex_t *","clockid_t","FAR const struct timespec *"
@ -177,11 +177,11 @@
"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","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 *"
"sigtimedwait","signal.h","","int","FAR const sigset_t *","FAR struct siginfo *","FAR const struct timespec *"
"sigwaitinfo","signal.h","","int","FAR const sigset_t *","FAR struct siginfo *"
"sigprocmask","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","int","FAR const sigset_t *","FAR sigset_t *"
"sigqueue","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","int","int","union sigval|FAR void *|sival_ptr"
"sigsuspend","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR const sigset_t *"
"sigtimedwait","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR const sigset_t *","FAR struct siginfo *","FAR const struct timespec *"
"sigwaitinfo","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR const sigset_t *","FAR struct siginfo *"
"socket","sys/socket.h","defined(CONFIG_NET)","int","int","int","int"
"socketpair","sys/socket.h","defined(CONFIG_NET)","int","int","int","int","int [2]|FAR int *"
"stat","sys/stat.h","","int","FAR const char *","FAR struct stat *"

Can't render this file because it has a wrong number of fields in line 2.