Cleanup: doc/examples makefile
[urcu.git] / tests / test_looplen.c
index 01394e0520292a892673d7d67f07210d4acd29e3..16674e76ac442343b77ea27d1994a5920cd6c9e7 100644 (file)
 #include <unistd.h>
 #include <stdio.h>
 #include <assert.h>
-#include <sys/syscall.h>
 #include <sched.h>
 #include <errno.h>
 
 #include <urcu/arch.h>
 
-#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
@@ -58,9 +42,9 @@ static inline pid_t gettid(void)
 #endif
 #include <urcu.h>
 
-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();
 }
 
This page took 0.025494 seconds and 4 git commands to generate.