mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user