replace nxsched_gettid with nxsched_getpid.

When we find the exit status entry in this task, we need to use pid instead of tid.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
cuiziwei 2023-05-31 15:47:46 +08:00 committed by Xiang Xiao
parent 50fe301e8f
commit 5e3df24092
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,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, nxsched_gettid());
child = group_find_child(group, nxsched_getpid());
if (child)
{
/* Save the exit status.. For the case of HAVE_GROUP_MEMBERS,
@ -107,7 +107,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, nxsched_gettid());
child = group_find_child(group, nxsched_getpid());
if (child)
{
/* Mark that all members of the child task group has exited */