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:
Xiang Xiao 2023-01-22 00:36:51 +08:00 committed by Alin Jerpelea
parent 1b94806b35
commit 55565a6099

View File

@ -526,6 +526,7 @@ void pthread_yield(void);
/* A thread may obtain a copy of its own thread handle. */
#define pthread_self() ((pthread_t)gettid())
#define pthread_gettid_np(thread) ((pid_t)(thread))
/* Compare two thread IDs. */