wfstack: return whether pop is popping the last element
[urcu.git] / tests / test_urcu_wfs.c
index ec9e198dd91319fc9a289881edd6767e47d0680c..90b2c3892558c6db3a9e0550f9957fe4d6496569 100644 (file)
 #include <unistd.h>
 #include <stdio.h>
 #include <assert.h>
-#include <sched.h>
 #include <errno.h>
 
 #include <urcu/arch.h>
 #include <urcu/tls-compat.h>
+#include <urcu/uatomic.h>
+#include "cpuset.h"
 
 #ifdef __linux__
 #include <syscall.h>
@@ -65,7 +66,6 @@ static inline pid_t gettid(void)
 #ifndef DYNAMIC_LINK_TEST
 #define _LGPL_SOURCE
 #endif
-#include <urcu.h>
 #include <urcu/wfstack.h>
 
 /*
@@ -112,12 +112,6 @@ static int use_affinity = 0;
 
 pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER;
 
-#ifndef HAVE_CPU_SET_T
-typedef unsigned long cpu_set_t;
-# define CPU_ZERO(cpuset) do { *(cpuset) = 0; } while(0)
-# define CPU_SET(cpu, cpuset) do { *(cpuset) |= (1UL << (cpu)); } while(0)
-#endif
-
 static void set_affinity(void)
 {
 #if HAVE_SCHED_SETAFFINITY
This page took 0.022171 seconds and 4 git commands to generate.