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 -1
View File
@@ -202,7 +202,8 @@ ssize_t file_mq_timedreceive(FAR struct file *mq, FAR char *msg,
/* Start the watchdog */
wd_start(&rtcb->waitdog, ticks, nxmq_rcvtimeout, gettid());
wd_start(&rtcb->waitdog, ticks,
nxmq_rcvtimeout, nxsched_gettid());
}
/* Get the message from the message queue */
+1 -1
View File
@@ -245,7 +245,7 @@ int file_mq_timedsend(FAR struct file *mq, FAR const char *msg,
/* Start the watchdog and begin the wait for MQ not full */
wd_start(&rtcb->waitdog, ticks, nxmq_sndtimeout, gettid());
wd_start(&rtcb->waitdog, ticks, nxmq_sndtimeout, nxsched_gettid());
/* And wait for the message queue to be non-empty */