Rename all arch primitives with prefix caa_
[urcu.git] / urcu / uatomic_generic.h
index 9ee7b7bdc22a6bedeef45ef6447d930162375c99..6b4ef9e8ddb8e0ab1eabca7e1541e421ba87adbe 100644 (file)
 extern "C" {
 #endif
 
-#ifndef BITS_PER_LONG
-#define BITS_PER_LONG  (__SIZEOF_LONG__ * 8)
-#endif
-
 #ifndef uatomic_set
-#define uatomic_set(addr, v)   STORE_SHARED(*(addr), (v))
+#define uatomic_set(addr, v)   CAA_STORE_SHARED(*(addr), (v))
 #endif
 
 #ifndef uatomic_read
-#define uatomic_read(addr)     LOAD_SHARED(*(addr))
+#define uatomic_read(addr)     CAA_LOAD_SHARED(*(addr))
 #endif
 
 #if !defined __OPTIMIZE__  || defined UATOMIC_NO_LINK_ERROR
@@ -162,9 +158,9 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
 
                do {
                        old = uatomic_read((unsigned int *)addr);
-               while (!__sync_bool_compare_and_swap_4(addr, old, val));
+               while (!__sync_bool_compare_and_swap_4(addr, old, val));
 
-               return old;
+               return old;
        }
 #if (BITS_PER_LONG == 64)
        case 8:
This page took 0.022109 seconds and 4 git commands to generate.