Deprecate wfqueue
[urcu.git] / tests / test_urcu_wfq.c
index 75a9275e74f2d9a4ae42c2fd1e9fa4ce33751546..d1760414f30378151a62d8c34656e9f09002d6fc 100644 (file)
@@ -65,6 +65,10 @@ static inline pid_t gettid(void)
 #ifndef DYNAMIC_LINK_TEST
 #define _LGPL_SOURCE
 #endif
+
+/* Remove deprecation warnings from test build. */
+#define CDS_WFQ_DEPRECATED
+
 #include <urcu.h>
 #include <urcu/wfqueue.h>
 
@@ -77,9 +81,9 @@ static unsigned long duration;
 /* read-side C.S. duration, in loops */
 static unsigned long wdelay;
 
-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();
 }
 
@@ -105,9 +109,10 @@ typedef unsigned long cpu_set_t;
 
 static void set_affinity(void)
 {
+#if HAVE_SCHED_SETAFFINITY
        cpu_set_t mask;
-       int cpu;
-       int ret;
+       int cpu, ret;
+#endif /* HAVE_SCHED_SETAFFINITY */
 
        if (!use_affinity)
                return;
This page took 0.022959 seconds and 4 git commands to generate.