sched: Disable the scheduling when send SIGCHLD signal
Disable the scheduling to prevent other tasks from being deleted after they are awakened Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
This commit is contained in:
parent
b52ad53cc1
commit
cdb5a7c6d4
@ -448,6 +448,12 @@ void nxtask_exithook(FAR struct tcb_s *tcb, int status)
|
|||||||
irqstate_t flags = enter_critical_section();
|
irqstate_t flags = enter_critical_section();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Disable the scheduling function to prevent other tasks from
|
||||||
|
* being deleted after they are awakened
|
||||||
|
*/
|
||||||
|
|
||||||
|
sched_lock();
|
||||||
|
|
||||||
/* Send the SIGCHLD signal to the parent task group */
|
/* Send the SIGCHLD signal to the parent task group */
|
||||||
|
|
||||||
nxtask_signalparent(tcb, status);
|
nxtask_signalparent(tcb, status);
|
||||||
@ -456,6 +462,8 @@ void nxtask_exithook(FAR struct tcb_s *tcb, int status)
|
|||||||
|
|
||||||
nxtask_exitwakeup(tcb, status);
|
nxtask_exitwakeup(tcb, status);
|
||||||
|
|
||||||
|
sched_unlock();
|
||||||
|
|
||||||
/* Leave the task group. Perhaps discarding any un-reaped child
|
/* Leave the task group. Perhaps discarding any un-reaped child
|
||||||
* status (no zombies here!)
|
* status (no zombies here!)
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user