sched: move process ID from kernel to TLS for faster access

Add pid field to task_info_s and move getpid() implementation to user
space TLS access. Remove getpid from syscall interface as it now returns
cached PID from thread local storage instead of kernel lookup.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2025-06-05 21:11:42 +08:00 committed by Xiang Xiao
parent 0f7c992cea
commit 8bb6758490
8 changed files with 64 additions and 26 deletions

View file

@ -45,7 +45,6 @@
"gethostname","unistd.h","","int","FAR char *","size_t"
"getitimer","sys/time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","int","FAR struct itimerval *"
"getpeername","sys/socket.h","defined(CONFIG_NET)","int","int","FAR struct sockaddr *","FAR socklen_t *"
"getpid","unistd.h","","pid_t"
"getppid","unistd.h","defined(CONFIG_SCHED_HAVE_PARENT)","pid_t"
"getsockname","sys/socket.h","defined(CONFIG_NET)","int","int","FAR struct sockaddr *","FAR socklen_t *"
"getsockopt","sys/socket.h","defined(CONFIG_NET)","int","int","int","int","FAR void *","FAR socklen_t *"

Can't render this file because it has a wrong number of fields in line 2.