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
@@ -583,7 +583,7 @@ static int mac802154dev_ioctl(FAR struct file *filep, int cmd,
/* Save the notification events */
dev->md_notify_event = macarg->event;
dev->md_notify_pid = getpid();
dev->md_notify_pid = nxsched_getpid();
dev->md_notify_registered = true;
ret = OK;
+1 -1
View File
@@ -939,7 +939,7 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int cmd,
/* Save the notification events */
priv->md_notify_event = netmac->u.event;
priv->md_notify_pid = getpid();
priv->md_notify_pid = nxsched_getpid();
priv->md_notify_registered = true;
ret = OK;
}