sched/signal/sig_dispatch.c: Correct signal dispatch to specific thread
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>
This commit is contained in:
parent
628c05acf3
commit
a4c42e54f7
1 changed files with 4 additions and 4 deletions
|
|
@ -755,12 +755,12 @@ int nxsig_dispatch(pid_t pid, FAR siginfo_t *info, bool thread)
|
|||
{
|
||||
if (thread)
|
||||
{
|
||||
/* Before the notification, we should validate the tid and
|
||||
* and make sure that the notified thread is in same process
|
||||
* with the current thread.
|
||||
/* Before the notification, we should validate the tid. If the
|
||||
* signal is to be delivered to a thread which has exited, it is
|
||||
* just dropped.
|
||||
*/
|
||||
|
||||
if (stcb != NULL && group == this_task()->group)
|
||||
if (stcb != NULL)
|
||||
{
|
||||
return nxsig_tcbdispatch(stcb, info, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue