mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Move gettid() implementation to /libs/libc/unistd
Move sched/task/task/task_gettid.c to libs/libc/unistd/lib_gettid.c. gettid() is a dumb wrapper around getpid(). It is wasteful of resources to support TWO systme calls, one for getpid() and one for gettid(). Instead, move gettid() in the C library where it calls the single sysgtem call, getpid(). Much cleaner.
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
"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"
|
||||
"gettid","unistd.h","","pid_t"
|
||||
"getrandom","sys/random.h","defined(CONFIG_CRYPTO_RANDOM_POOL)","void","FAR void *","size_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 *"
|
||||
|
||||
|
Reference in New Issue
Block a user