X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_ja_range.h;h=1f8c2a2f046d48a5aea3ece45cec14412e53f2f0;hb=b10c8ba83ff83cc8bed4bd62832020f9572e0e92;hp=e9bbdbc3ed7eb8f57e30c26b8789ba609a6bfdd9;hpb=9f446823a2f64fbc9b9af984dc797c73f4107310;p=urcu.git diff --git a/tests/test_urcu_ja_range.h b/tests/test_urcu_ja_range.h index e9bbdbc..1f8c2a2 100644 --- a/tests/test_urcu_ja_range.h +++ b/tests/test_urcu_ja_range.h @@ -38,10 +38,7 @@ #include #include - -#ifdef __linux__ -#include -#endif +#include "thread-id.h" #define DEFAULT_RAND_POOL 1000000 @@ -61,23 +58,6 @@ #define poison_free(ptr) free(ptr) #endif - - -#if defined(_syscall0) -_syscall0(pid_t, gettid) -#elif defined(__NR_gettid) -static inline pid_t gettid(void) -{ - return syscall(__NR_gettid); -} -#else -#warning "use pid as tid" -static inline pid_t gettid(void) -{ - return getpid(); -} -#endif - #ifndef DYNAMIC_LINK_TEST #define _LGPL_SOURCE #else