sched/getpid: replace syscall getpid/tid/ppid() to kernel version

NuttX kernel should not use the syscall functions, especially after
enabling CONFIG_SCHED_INSTRUMENTATION_SYSCALL, all system functions
will be traced to backend, which will impact system performance.

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-02-01 18:05:58 +08:00
committed by Xiang Xiao
parent c24dc389e4
commit 4c8d244fae
57 changed files with 111 additions and 93 deletions
+2 -2
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, gettid());
child = group_find_child(group, nxsched_gettid());
if (child)
{
/* Save the exit status.. For the case of HAVE_GROUP_MEMBERS,
@@ -105,7 +105,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, gettid());
child = group_find_child(group, nxsched_gettid());
if (child)
{
/* Mark that all members of the child task group has exited */