X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fcommon%2Fthread-id.h;h=72613333b2ab0ddb482a6fd486fb6c51a9d0ca9f;hb=bd23adba12c00d7e2a9f4f841daf3d03c38cdb2c;hp=9378edcf2ce9246f12f0260eaf294ad2de1ceaf2;hpb=f5ab766ee2c8300cb00ca5878b1cb464f960a66d;p=urcu.git diff --git a/tests/common/thread-id.h b/tests/common/thread-id.h index 9378edc..7261333 100644 --- a/tests/common/thread-id.h +++ b/tests/common/thread-id.h @@ -17,9 +17,8 @@ * provided the above notices are retained, and a notice that the code was * modified is included with the above copyright notice. */ - #ifdef __linux__ -# include +# include # if defined(_syscall0) _syscall0(pid_t, gettid) @@ -43,6 +42,11 @@ unsigned long urcu_get_thread_id(void) { return (unsigned long) pthread_getthreadid_np(); } +#elif defined(__Android__) +/* + * Do not redefine gettid() as it is already included + * in bionic through . + */ #else # warning "use pid as thread ID" static inline