mirror of
https://github.com/apache/nuttx.git
synced 2026-05-13 10:38:40 +08:00
a73ff585f1
Build Documentation / build-html (push) Has been cancelled
In multi-core scenarios, a problem occurs: the target thread receives SIGCONT but does not execute them. Further analysis reveals that in the sig_dispatch function, the target thread is placed in the readytorun queue only if the SIGCONT signal is sent and the target thread is in the TSTATE_TASK_STOPPED state. However, if the following conditions occur: CPU0 CPU1 dispatch SIGSTOP dispatch SIGCONT(check state) sched_suspend(set task_state = TSTATE_TASK_STOPPED) This causes the target thread on CPU 1 to receive SIGCONT but not be placed in the readytorun queue, remaining in the stopped state. Therefore, A flag is needed to indicate whether the SIGCONT action has been executed. At the same time, the critical section protection range of nxsig_stop_task needs to be expanded to prevent another thread from executing the SIGCONT logic during the execution of this function. Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>