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
+1 -1
View File
@@ -557,7 +557,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
opriv->ao_notify.an_press = notify->an_press;
opriv->ao_notify.an_release = notify->an_release;
opriv->ao_notify.an_event = notify->an_event;
opriv->ao_pid = getpid();
opriv->ao_pid = nxsched_getpid();
/* Enable/disable interrupt handling */
+1 -1
View File
@@ -607,7 +607,7 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
opriv->bo_notify.bn_press = notify->bn_press;
opriv->bo_notify.bn_release = notify->bn_release;
opriv->bo_notify.bn_event = notify->bn_event;
opriv->bo_pid = getpid();
opriv->bo_pid = nxsched_getpid();
/* Enable/disable interrupt handling */
+1 -1
View File
@@ -553,7 +553,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
opriv->do_notify.dn_press = notify->dn_press;
opriv->do_notify.dn_release = notify->dn_release;
opriv->do_notify.dn_event = notify->dn_event;
opriv->do_pid = getpid();
opriv->do_pid = nxsched_getpid();
/* Enable/disable interrupt handling */