-
Notifications
You must be signed in to change notification settings - Fork 1.4k
sched/signals: add support to partially or fully disable signals #17644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wangchdo
wants to merge
11
commits into
apache:master
Choose a base branch
from
wangchdo:add_all_partial_signal_disabling
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
sched/signals: add support to partially or fully disable signals #17644
wangchdo
wants to merge
11
commits into
apache:master
from
wangchdo:add_all_partial_signal_disabling
+435
−154
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Contributor
|
@Fix-Point please help to review |
anchao
approved these changes
Dec 25, 2025
Contributor
|
After disabling the signal/sig_ppoll.c:102:7: warning: implicit declaration of function 'nxsig_unmask_pendingsignal'; did you mean 'nxsig_remove_pendingsignal'? [-Wimplicit-function-declaration]
102 | if (nxsig_unmask_pendingsignal())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| nxsig_remove_pendingsignal
CC: net/lib_addrconfig.c signal/sig_pselect.c: In function 'pselect':
signal/sig_pselect.c:99:7: warning: implicit declaration of function 'nxsig_unmask_pendingsignal'; did you mean 'nxsig_remove_pendingsignal'? [-Wimplicit-function-declaration]
99 | if (nxsig_unmask_pendingsignal())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| nxsig_remove_pendingsignal
CC: net/lib_base64.c signal/sig_suspend.c: In function 'sigsuspend':
signal/sig_suspend.c:111:7: warning: implicit declaration of function 'nxsig_unmask_pendingsignal'; did you mean 'nxsig_remove_pendingsignal'? [-Wimplicit-function-declaration]
111 | if (nxsig_unmask_pendingsignal())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| nxsig_remove_pendingsignalSome files also call
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Arch: arm
Issues related to ARM (32-bit) architecture
Arch: arm64
Issues related to ARM64 (64-bit) architecture
Arch: risc-v
Issues related to the RISC-V (32-bit or 64-bit) architecture
Arch: tricore
Issues related to the TriCore architecture from Infineon
Arch: x86
Issues related to the x86 architecture
Arch: x86_64
Issues related to the x86_64 architecture
Arch: xtensa
Issues related to the Xtensa architecture
Arch: z16
Issues related to the Z16 architecture
Arch: z80
Issues related to the Z80 architecture
Area: Drivers
Drivers issues
Area: File System
File System issues
Area: OS Components
OS Components issues
Size: L
The size of the change in this PR is large
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Signals in NuttX serve two primary purposes:
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.
Asynchronous notification
Signals can also be used to register callback handlers for specific signals, allowing threads to asynchronously invoke those handlers when the signals are delivered.
The PR #17357 Introduced the ability to disable only the synchronization and wake-up functionality of signals, while retaining part of the signal infrastructure. This allows moderate memory savings and performance improvements.
The PR #17352 Introduced the ability to completely disable all signal functionality, providing more aggressive memory reduction and performance optimization.
This PR consolidates the above two efforts and introduces a unified mechanism that supports both:
Partial signal disablement: disabling only asynchronous notification while retaining synchronization and wake-up functionality.
Full signal disablement: disabling both synchronization / wake-up and asynchronous notification functionality.
This consolidation enables finer-grained control over signal usage, allowing system integrators to better balance functionality, memory footprint, and performance for different use cases.
Impact
Provide configuration to fully or partially disable signals, should have no impact to exist nuttx functions if
the configuration is not enabled
this PR depends on apache/nuttx-apps#3265 to fix build dependency issues when signals are partially or fully disabled.
Testing
Below tests depend on apache/nuttx-apps#3265
ostest passed on rv-virt:smp64 when CONFIG_ENABLE_PARTIAL_SIGNALS=y