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:
Gregory Nutt
2020-09-22 17:09:13 -06:00
committed by Xiang Xiao
parent 7d889bf4c4
commit ebdfd16f0f
5 changed files with 3 additions and 4 deletions
-1
View File
@@ -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 *"
1 _exit unistd.h void int
35 getitimer sys/time.h !defined(CONFIG_DISABLE_POSIX_TIMERS) int int
36 getpeername sys/socket.h defined(CONFIG_NET) int int
37 getpid unistd.h pid_t
gettid unistd.h pid_t
38 getrandom sys/random.h defined(CONFIG_CRYPTO_RANDOM_POOL) void FAR void *
39 getsockname sys/socket.h defined(CONFIG_NET) int int
40 getsockopt sys/socket.h defined(CONFIG_NET) int int