Rename all memory primitives with prefix cmm_
[urcu.git] / urcu / arch_s390.h
index 71717686c77f23589e8664981aa1126a4248896c..8a33e203ecb8cee76e5f6c1a1e5b662a5395837a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _ARCH_S390_H
-#define _ARCH_S390_H
+#ifndef _URCU_ARCH_S390_H
+#define _URCU_ARCH_S390_H
 
 /*
  * Trivial definitions for the S390 architecture based on information from the
  * IN THE SOFTWARE.
  */
 
-#include <compiler.h>
+#include <urcu/compiler.h>
+#include <urcu/config.h>
 
-#define CONFIG_HAVE_MEM_COHERENCY
-/* Assume SMP machine, given we don't have this information */
-#define CONFIG_SMP 1
+#ifdef __cplusplus
+extern "C" {
+#endif 
 
-#ifndef BITS_PER_LONG
-#define BITS_PER_LONG  (__SIZEOF_LONG__ * 8)
-#endif
-
-#define mb()    __asm__ __volatile__("bcr 15,0" : : : "memory")
-#define rmb()   __asm__ __volatile__("bcr 15,0" : : : "memory");
-#define wmb()   __asm__ __volatile__("bcr 15,0" : : : "memory");
-#define mc()   barrier()
-#define rmc()  barrier()
-#define wmc()  barrier()
+#define CACHE_LINE_SIZE        128
 
-#define smp_mb()       mb()
-#define smp_rmb()      rmb()
-#define smp_wmb()      wmb()
-#define smp_mc()       mc()
-#define smp_rmc()      rmc()
-#define smp_wmc()      wmc()
-
-/* Nop everywhere except on alpha. */
-#define smp_read_barrier_depends()
-
-static inline void cpu_relax(void)
-{
-       barrier();
-}
-
-static inline void sync_core()
-{
-       __asm__ __volatile__("bcr 15,0" : : : "memory");
-}
+#define cmm_mb()    __asm__ __volatile__("bcr 15,0" : : : "memory")
 
 typedef unsigned long long cycles_t;
 
@@ -76,4 +50,10 @@ static inline cycles_t get_cycles (void)
        return cycles;
 }
 
-#endif /* _ARCH_S390_H */
+#ifdef __cplusplus 
+}
+#endif
+
+#include <urcu/arch_generic.h>
+
+#endif /* _URCU_ARCH_S390_H */
This page took 0.023362 seconds and 4 git commands to generate.