sched/task: fix pthread call exit() failed

Change-Id: I31cecacad65fb040bfe21a90c360a7d99f0a38f2
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2021-01-15 18:24:27 +08:00
committed by liguiding1
parent ed386f09eb
commit 3a94bd3376
+4 -2
View File
@@ -191,6 +191,7 @@ static inline void nxtask_exitstatus(FAR struct task_group_s *group,
int status)
{
FAR struct child_status_s *child;
FAR struct tcb_s *rtcb = this_task();
/* Check if the parent task group has suppressed retention of
* child exit status information.
@@ -200,7 +201,7 @@ static inline void nxtask_exitstatus(FAR struct task_group_s *group,
{
/* No.. Find the exit status entry for this task in the parent TCB */
child = group_find_child(group, getpid());
child = group_find_child(group, rtcb->group->tg_task);
if (child)
{
/* Save the exit status.. For the case of HAVE_GROUP_MEMBERS,
@@ -230,6 +231,7 @@ static inline void nxtask_exitstatus(FAR struct task_group_s *group,
static inline void nxtask_groupexit(FAR struct task_group_s *group)
{
FAR struct child_status_s *child;
FAR struct tcb_s *rtcb = this_task();
/* Check if the parent task group has suppressed retention of child exit
* status information.
@@ -239,7 +241,7 @@ static inline void nxtask_groupexit(FAR struct task_group_s *group)
{
/* No.. Find the exit status entry for this task in the parent TCB */
child = group_find_child(group, getpid());
child = group_find_child(group, rtcb->group->tg_task);
if (child)
{
/* Mark that all members of the child task group has exited */