pthread: Implement pthread_gettid_np
which is provided by bionic libc: https://android.googlesource.com/platform/bionic/+/master/libc/include/pthread.h#172 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
1b94806b35
commit
55565a6099
@ -525,7 +525,8 @@ void pthread_yield(void);
|
|||||||
|
|
||||||
/* A thread may obtain a copy of its own thread handle. */
|
/* A thread may obtain a copy of its own thread handle. */
|
||||||
|
|
||||||
#define pthread_self() ((pthread_t)gettid())
|
#define pthread_self() ((pthread_t)gettid())
|
||||||
|
#define pthread_gettid_np(thread) ((pid_t)(thread))
|
||||||
|
|
||||||
/* Compare two thread IDs. */
|
/* Compare two thread IDs. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user