Fix precompiler error in arch_*.h, add arch-api test
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 11 May 2009 02:50:48 +0000 (22:50 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 11 May 2009 02:50:48 +0000 (22:50 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Makefile
arch_ppc.h
arch_x86.h
urcu-static.h

index 1965a775b0cc97fc2295e8b34942338ff3e3bd58..20024c65496296734699abc6e9a7954414120bb5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,10 +11,15 @@ LDFLAGS=-lpthread
 
 SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'`
 
-all: test_urcu test_urcu_dynamic_link test_urcu_timing \
+all: arch-api test_urcu test_urcu_dynamic_link test_urcu_timing \
        test_rwlock_timing test_urcu_yield urcu-asm.S \
        urcu-asm.o urcutorture urcutorture-yield liburcu.so
 
+arch-api: api.h arch.h
+       # Run either make pthreads-x86 or make pthreads-ppc prior to build
+       # the RCU library. Architecture auto-detectection not implemented
+       # in the build system yet.
+
 pthreads-x86: clean
        cp api_x86.h api.h
        cp arch_x86.h arch.h
@@ -59,7 +64,7 @@ urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
 urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
        $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
 
-.PHONY: clean install
+.PHONY: clean install arch-api
 
 install: liburcu.so
        cp -f liburcu.so /usr/lib/
index 1a34024461909a6078423ee4171945ca002fdb62..40d186b1c107bd4da45d89fa6977d31ba7eb1cbd 100644 (file)
@@ -28,7 +28,7 @@
 #define CONFIG_HAVE_MEM_COHERENCY
 
 #ifndef BITS_PER_LONG
-#define BITS_PER_LONG   (sizeof(unsigned long) * 8)
+#define BITS_PER_LONG  (sizeof(unsigned long) * 8)
 #endif
 
 #define mb()    asm volatile("sync":::"memory")
index 01b5d50bde8e174cd255a4270172b48bca55e784..e899684b56ddc50b9c43b506e6cb3ccdd6f254d0 100644 (file)
@@ -29,7 +29,7 @@
 #define CONFIG_HAVE_MEM_COHERENCY
 
 #ifndef BITS_PER_LONG
-#define BITS_PER_LONG  (sizeof(unsigned long) * 8)
+#define BITS_PER_LONG  (__SIZEOF_LONG__ * 8)
 #endif
 
 #ifdef CONFIG_HAVE_FENCE
index c47a759d132357a7af23301ece58c238a200d2ec..f1aab2f2dfed0123070e3d608fec00701a3b364d 100644 (file)
@@ -4,14 +4,27 @@
 /*
  * urcu-static.h
  *
- * Userspace RCU header, to be included only in LGPL-compatible code.
+ * Userspace RCU header.
  *
- * Copyright February 2009 - Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+ * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu.h for linking
+ * dynamically with the userspace rcu library.
  *
- * Credits for Paul E. McKenney <paulmck@linux.vnet.ibm.com>
- * for inspiration coming from the Linux kernel RCU and rcu-preempt.
+ * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+ * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
  *
- * Distributed under LGPLv2.1
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  *
  * IBM's contributions to this file may be relicensed under LGPLv2 or later.
  */
This page took 0.026694 seconds and 4 git commands to generate.