mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
sched/task: fix pthread call exit() failed
Change-Id: I31cecacad65fb040bfe21a90c360a7d99f0a38f2 Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user