X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_urcu_hash.h;h=5a6a79aaaa8a72675bbdd5b35d23731dfb5c62a0;hp=50e720ac1749518aaf3b706b8e9cbd6d6d25454a;hb=94df63189704b8f6483c737988df3728f5e13c2d;hpb=550265b2c2de28e0fe566f71fb1cab64fa620efa diff --git a/tests/test_urcu_hash.h b/tests/test_urcu_hash.h index 50e720a..5a6a79a 100644 --- a/tests/test_urcu_hash.h +++ b/tests/test_urcu_hash.h @@ -38,10 +38,7 @@ #include #include "cpuset.h" - -#ifdef __linux__ -#include -#endif +#include "thread-id.h" #define DEFAULT_HASH_SIZE 32 #define DEFAULT_MIN_ALLOC_SIZE 1 @@ -71,23 +68,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