X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fapi.h;h=2b876565c991351a86f3c61748addc1d20b1a68a;hb=108a92e5b97ee91b2b902dba2dd2e78aab42f420;hp=03c370b12d40b94519a33adfc8b55f2f214c1ac3;hpb=76ca5685bbc20ebbfdc50d07f1d717769668cb8e;p=urcu.git diff --git a/tests/api.h b/tests/api.h index 03c370b..2b87656 100644 --- a/tests/api.h +++ b/tests/api.h @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (c) 2006 Paul E. McKenney, IBM. * @@ -29,6 +29,7 @@ #include #include +#include "cpuset.h" /* * Machine parameters. @@ -54,7 +55,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (c) 2006 Paul E. McKenney, IBM. */ @@ -65,7 +66,6 @@ #include #include #include -#include #include /* #include "atomic.h" */ @@ -156,8 +156,8 @@ static int __smp_thread_id(void) return i; } spin_unlock(&__thread_id_map_mutex); - fprintf(stderr, "smp_thread_id: Rogue thread, id: %d(%#x)\n", - (int)tid, (int)tid); + fprintf(stderr, "smp_thread_id: Rogue thread, id: %lu(%#lx)\n", + (unsigned long) tid, (unsigned long) tid); exit(-1); } @@ -206,8 +206,8 @@ static void *wait_thread(thread_id_t tid) break; } if (i >= NR_THREADS){ - fprintf(stderr, "wait_thread: bad tid = %d(%#x)\n", - (int)tid, (int)tid); + fprintf(stderr, "wait_thread: bad tid = %lu(%#lx)\n", + (unsigned long)tid, (unsigned long)tid); exit(-1); } if (pthread_join(tid, &vp) != 0) { @@ -231,12 +231,6 @@ static void wait_all_threads(void) } } -#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 run_on(int cpu) { #if HAVE_SCHED_SETAFFINITY