From 55565a609926390fe52be55f54c24fa40a77a013 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 22 Jan 2023 00:36:51 +0800 Subject: [PATCH] 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 --- include/pthread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/pthread.h b/include/pthread.h index 05616a54c6..639badd12f 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -525,7 +525,8 @@ void pthread_yield(void); /* 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. */