sched/signal/sig_dispatch.c: Correct signal dispatch to specific thread#16939
Merged
Conversation
1 task
jlaitine
commented
Aug 29, 2025
The signal dispatch is called from interrupt handlers as well, so this_task() is wrong. The thread to which the signal is supposed to be delivered is known (stcb), use that. Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
740b7de to
6a41b52
Compare
acassis
previously approved these changes
Aug 29, 2025
Contributor
|
I added requires more tests, we had agreed that modifications in the core part needs extensive tests in real hardware |
3534af0 to
6a41b52
Compare
1 task
The nxsig_dispatch should just deliver the signal to either a thread by pid (tid) or to the process (group) by pid. Simplify the code so that the intent is more obvious. Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
e0d9dad to
26bae56
Compare
xiaoxiang781216
approved these changes
Aug 31, 2025
anchao
approved these changes
Sep 2, 2025
anchao
left a comment
Contributor
There was a problem hiding this comment.
LGTM, We had a similar problem that the signal cannot be delivered from different groups, thanks for the fix
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Use of this_task() to identify which thread the signal should be delivered to is just wrong. Replace is with stcb.
Impact
Fixes signal delivery from uart driver (tty), e.g. ctrl-c.
Testing
Tested on qemu