rcu torture and api.h: remove duplicated atomic primitives
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 24 Sep 2009 00:10:51 +0000 (20:10 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 24 Sep 2009 00:10:51 +0000 (20:10 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
tests/api_gcc.h
tests/api_ppc.h
tests/api_x86.h
tests/rcutorture.h
tests/urcutorture.c

index 963f842215dd1eb4e95186b99a7059dbf70a9fe1..721af0a4813c25c498c391de49ba5d5e8d7d68c9 100644 (file)
@@ -75,6 +75,7 @@
 
 #define LOCK_PREFIX "lock ; "
 
+#if 0 /* duplicate with arch_atomic.h */
 /*
  * Atomic data structure, initialization, and access.
  */
@@ -251,6 +252,8 @@ cmpxchg(volatile long *ptr, long oldval, long newval)
 #define smp_mb__before_atomic_inc()    barrier()
 #define smp_mb__after_atomic_inc()     barrier()
 
+#endif //0 /* duplicate with arch_atomic.h */
+
 /*
  * api_pthreads.h: API mapping to pthreads environment.
  *
index 1d9c47e277b86ec87abc8fdc87f37cb15d990b49..8359d042b9b9878bdf2432e0da5943a5ec4e880d 100644 (file)
@@ -77,6 +77,8 @@
 #define ____cacheline_internodealigned_in_smp \
        __attribute__((__aligned__(1 << 7)))
 
+#if 0 /* duplicate with arch_atomic.h */
+
 /*
  * Atomic data structure, initialization, and access.
  */
@@ -102,7 +104,6 @@ typedef struct { volatile int counter; } atomic_t;
 #  define ISYNC_ON_SMP
 #endif
 
-
 /*
  * Atomic exchange
  *
@@ -617,6 +618,8 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
 #define smp_mb__before_atomic_inc()    smp_mb()
 #define smp_mb__after_atomic_inc()     smp_mb()
 
+#endif //0 /* duplicate with arch_atomic.h */
+
 /*
  * api_pthreads.h: API mapping to pthreads environment.
  *
index d64eb8d4a6a2d89a17c4f4636697d303d778811e..9ca5500758b3778dbfea79b7aa31f7c8e1785b13 100644 (file)
@@ -77,6 +77,8 @@
 
 #define LOCK_PREFIX "lock ; "
 
+#if 0 /* duplicate with arch_atomic.h */
+
 /*
  * Atomic data structure, initialization, and access.
  */
@@ -310,6 +312,8 @@ __asm__ __volatile__(LOCK_PREFIX "orl %0,%1" \
 #define smp_mb__before_atomic_inc()    barrier()
 #define smp_mb__after_atomic_inc()     barrier()
 
+#endif //0
+
 /*
  * api_pthreads.h: API mapping to pthreads environment.
  *
index 00b0b316b736c181aa3270d45a78b5403637db87..7d4948e59626b486524af30fa4b0dcc5f9bfc02b 100644 (file)
@@ -70,7 +70,7 @@ DEFINE_PER_THREAD(long long, n_updates_pt);
 
 long long n_reads = 0LL;
 long n_updates = 0L;
-atomic_t nthreadsrunning;
+int nthreadsrunning;
 char argsbuf[64];
 
 #define GOFLAG_INIT 0
index 70abc68df7efb3f3ea9cc5c90e543493f2f7f24b..a0aa5dd82830c2ee14de450b6461c49eeb1cdb73 100644 (file)
@@ -3,6 +3,7 @@
 #include <poll.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "../arch_atomic.h"
 #include "api.h"
 #define _LGPL_SOURCE
 #include "../urcu.h"
This page took 0.036679 seconds and 4 git commands to generate.