Add extern "C" to support linking userspace RCU library with C++ applications
[urcu.git] / urcu / uatomic_arch_sparc64.h
index 35b9ac269c11197b52eac7d55546a7d3479586ed..3aa3b7d9afb889b7f7cd8df80445148dc2dc523b 100644 (file)
 #include <urcu/compiler.h>
 #include <urcu/system.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
 #ifndef __SIZEOF_LONG__
-#if (defined(__sparc_v8__) || defined(__sparc_v9__))
+#ifdef __LP64__
 #define __SIZEOF_LONG__ 8
 #else
 #define __SIZEOF_LONG__ 4
@@ -126,8 +130,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
 /* uatomic_add_return */
 
 static inline __attribute__((always_inline))
-unsigned long _uatomic_add_return(void *addr, unsigned long val,
-                                int len)
+unsigned long _uatomic_add_return(void *addr, unsigned long val, int len)
 {
        switch (len) {
        case 4:
@@ -176,7 +179,10 @@ unsigned long _uatomic_add_return(void *addr, unsigned long val,
 #define uatomic_inc(addr)              uatomic_add((addr), 1)
 #define uatomic_dec(addr)              uatomic_add((addr), -1)
 
-#define URCU_CAS_AVAIL()       1
 #define compat_uatomic_cmpxchg(ptr, old, _new) uatomic_cmpxchg(ptr, old, _new)
 
+#ifdef __cplusplus 
+}
+#endif
+
 #endif /* _URCU_ARCH_UATOMIC_PPC_H */
This page took 0.023926 seconds and 4 git commands to generate.