X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_looplen.c;h=16674e76ac442343b77ea27d1994a5920cd6c9e7;hp=3a750cc1b4e2fd5870dd85dfd6f44f2d41f61d70;hb=94df63189704b8f6483c737988df3728f5e13c2d;hpb=bc2433a9853a945a825c244e9ccfe341b73b2ceb diff --git a/tests/test_looplen.c b/tests/test_looplen.c index 3a750cc..16674e7 100644 --- a/tests/test_looplen.c +++ b/tests/test_looplen.c @@ -35,25 +35,6 @@ #include -#ifdef __linux__ -#include -#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 @@ -61,9 +42,9 @@ static inline pid_t gettid(void) #endif #include -static inline void loop_sleep(unsigned long l) +static inline void loop_sleep(unsigned long loops) { - while(l-- != 0) + while (loops-- != 0) caa_cpu_relax(); }