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