Fix tests: finer-grained use of CPU_SET, CPU_ZERO and cpu_set_t
[urcu.git] / tests / test_urcu_hash.h
index 4af34f7a3499cb9fdec2d9681f33edfde35d93fa..50e720ac1749518aaf3b706b8e9cbd6d6d25454a 100644 (file)
 #include <unistd.h>
 #include <stdio.h>
 #include <assert.h>
-#include <sched.h>
 #include <errno.h>
 #include <signal.h>
 
 #include <urcu/tls-compat.h>
+#include "cpuset.h"
 
 #ifdef __linux__
 #include <syscall.h>
@@ -195,12 +195,6 @@ extern int use_affinity;
 
 extern pthread_mutex_t affinity_mutex;
 
-#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
-
 void set_affinity(void);
 
 /*
This page took 0.022368 seconds and 4 git commands to generate.