From 5e3df240927fc13b1dd09255fc426a288f057346 Mon Sep 17 00:00:00 2001 From: cuiziwei Date: Wed, 31 May 2023 15:47:46 +0800 Subject: [PATCH] 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 --- sched/task/task_exithook.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/task/task_exithook.c b/sched/task/task_exithook.c index 7a9f02b5bb..ae6dcc76cd 100644 --- a/sched/task/task_exithook.c +++ b/sched/task/task_exithook.c @@ -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 */