]> granicus.if.org Git - libatomic_ops/commitdiff
Reformat code of gcc/aarch64.h
authorIvan Maidanski <ivmai@mail.ru>
Wed, 23 Jan 2013 21:20:49 +0000 (01:20 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 23 Jan 2013 21:20:49 +0000 (01:20 +0400)
src/atomic_ops/sysdeps/gcc/aarch64.h

index 51e2ffc947aa08f0ea5ee81d41741b3a1557b869..b3e9a6cfd10046d4ae777398446b0fb12b0498ae 100644 (file)
@@ -23,7 +23,7 @@ AO_INLINE void
 AO_nop_full(void)
 {
 # ifndef AO_UNIPROCESSOR
-__sync_synchronize ();
+    __sync_synchronize();
 # endif
 }
 #define AO_HAVE_nop_full
@@ -31,26 +31,26 @@ __sync_synchronize ();
 AO_INLINE AO_t
 AO_load(const volatile AO_t *addr)
 {
-  return  __atomic_load_n (addr, __ATOMIC_RELAXED);
+  return __atomic_load_n(addr, __ATOMIC_RELAXED);
 }
 #define AO_HAVE_load
 
 AO_INLINE AO_t
 AO_load_acquire(const volatile AO_t *addr)
 {
-  return __atomic_load_n (addr, __ATOMIC_ACQUIRE);
+  return __atomic_load_n(addr, __ATOMIC_ACQUIRE);
 }
 #define AO_HAVE_load_acquire
 
 AO_INLINE void
- AO_store(volatile AO_t *addr, AO_t value)
+AO_store(volatile AO_t *addr, AO_t value)
 {
   __atomic_store_n(addr, value, __ATOMIC_RELAXED);
 }
 #define AO_HAVE_store
 
 AO_INLINE void
- AO_store_release(volatile AO_t *addr, AO_t value)
+AO_store_release(volatile AO_t *addr, AO_t value)
 {
   __atomic_store_n(addr, value, __ATOMIC_RELEASE);
 }
@@ -59,126 +59,125 @@ AO_INLINE void
 AO_INLINE AO_TS_VAL_t
 AO_test_and_set(volatile AO_TS_t *addr)
 {
-    return __atomic_test_and_set(addr, __ATOMIC_RELAXED);
+  return __atomic_test_and_set(addr, __ATOMIC_RELAXED);
 }
 # define AO_HAVE_test_and_set
 
 AO_INLINE AO_TS_VAL_t
 AO_test_and_set_acquire(volatile AO_TS_t *addr)
 {
-    return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
+  return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
 }
 # define AO_HAVE_test_and_set_acquire
 
 AO_INLINE AO_TS_VAL_t
 AO_test_and_set_release(volatile AO_TS_t *addr)
 {
-    return __atomic_test_and_set(addr, __ATOMIC_RELEASE);
+  return __atomic_test_and_set(addr, __ATOMIC_RELEASE);
 }
 # define AO_HAVE_test_and_set_release
 
 AO_INLINE AO_TS_VAL_t
 AO_test_and_set_full(volatile AO_TS_t *addr)
 {
-    return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
+  return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
 }
 # define AO_HAVE_test_and_set_full
 
 AO_INLINE AO_t
-AO_fetch_and_add(volatile AO_t *p, AO_t incr)
+AO_fetch_and_add(volatile AO_t *addr, AO_t incr)
 {
-  return __atomic_fetch_add(p, incr, __ATOMIC_RELAXED);
+  return __atomic_fetch_add(addr, incr, __ATOMIC_RELAXED);
 }
 #define AO_HAVE_fetch_and_add
 
 AO_INLINE AO_t
-AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr)
+AO_fetch_and_add_acquire(volatile AO_t *addr, AO_t incr)
 {
-  return __atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE);
+  return __atomic_fetch_add(addr, incr, __ATOMIC_ACQUIRE);
 }
 #define AO_HAVE_fetch_and_add_acquire
 
 AO_INLINE AO_t
-AO_fetch_and_add_release(volatile AO_t *p, AO_t incr)
+AO_fetch_and_add_release(volatile AO_t *addr, AO_t incr)
 {
-  return __atomic_fetch_add(p, incr, __ATOMIC_RELEASE);
+  return __atomic_fetch_add(addr, incr, __ATOMIC_RELEASE);
 }
 #define AO_HAVE_fetch_and_add_release
 
 AO_INLINE AO_t
-AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
+AO_fetch_and_add_full(volatile AO_t *addr, AO_t incr)
 {
-  return __atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST);
+  return __atomic_fetch_add(addr, incr, __ATOMIC_SEQ_CST);
 }
 #define AO_HAVE_fetch_and_add_full
 
 AO_INLINE AO_t
-AO_fetch_and_add1(volatile AO_t *p)
+AO_fetch_and_add1(volatile AO_t *addr)
 {
-  return __atomic_fetch_add(p, 1, __ATOMIC_RELAXED);
+  return __atomic_fetch_add(addr, 1, __ATOMIC_RELAXED);
 }
 #define AO_HAVE_fetch_and_add1
 
 AO_INLINE AO_t
-AO_fetch_and_add1_acquire(volatile AO_t *p)
+AO_fetch_and_add1_acquire(volatile AO_t *addr)
 {
-  return __atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE);
+  return __atomic_fetch_add(addr, 1, __ATOMIC_ACQUIRE);
 }
 #define AO_HAVE_fetch_and_add1_acquire
 
 AO_INLINE AO_t
-AO_fetch_and_add1_release(volatile AO_t *p)
+AO_fetch_and_add1_release(volatile AO_t *addr)
 {
-  return __atomic_fetch_add(p, 1, __ATOMIC_RELEASE);
+  return __atomic_fetch_add(addr, 1, __ATOMIC_RELEASE);
 }
 #define AO_HAVE_fetch_and_add1_release
 
 AO_INLINE AO_t
-AO_fetch_and_add1_full(volatile AO_t *p)
+AO_fetch_and_add1_full(volatile AO_t *addr)
 {
-  return __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST);
+  return __atomic_fetch_add(addr, 1, __ATOMIC_SEQ_CST);
 }
 #define AO_HAVE_fetch_and_add1_full
 
 AO_INLINE AO_t
-AO_fetch_and_sub1(volatile AO_t *p)
+AO_fetch_and_sub1(volatile AO_t *addr)
 {
-  return __atomic_fetch_sub(p, 1, __ATOMIC_RELAXED);
+  return __atomic_fetch_sub(addr, 1, __ATOMIC_RELAXED);
 }
 #define AO_HAVE_fetch_and_sub1
 
 AO_INLINE AO_t
-AO_fetch_and_sub1_acquire(volatile AO_t *p)
+AO_fetch_and_sub1_acquire(volatile AO_t *addr)
 {
-  return __atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE);
+  return __atomic_fetch_sub(addr, 1, __ATOMIC_ACQUIRE);
 }
 #define AO_HAVE_fetch_and_sub1_acquire
 
 AO_INLINE AO_t
-AO_fetch_and_sub1_release(volatile AO_t *p)
+AO_fetch_and_sub1_release(volatile AO_t *addr)
 {
-  return __atomic_fetch_sub(p, 1, __ATOMIC_RELEASE);
+  return __atomic_fetch_sub(addr, 1, __ATOMIC_RELEASE);
 }
 #define AO_HAVE_fetch_and_sub1_release
 
 AO_INLINE AO_t
-AO_fetch_and_sub1_full(volatile AO_t *p)
+AO_fetch_and_sub1_full(volatile AO_t *addr)
 {
-  return __atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST);
+  return __atomic_fetch_sub(addr, 1, __ATOMIC_SEQ_CST);
 }
 #define AO_HAVE_fetch_and_sub1_full
 
-/* Returns nonzero if the comparison succeeded.  */
 AO_INLINE int
 AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
 {
-    return __sync_bool_compare_and_swap(addr, old_val, new_val);
+  return __sync_bool_compare_and_swap(addr, old_val, new_val);
 }
-# define AO_HAVE_compare_and_swap
+#define AO_HAVE_compare_and_swap
 
 AO_INLINE AO_t
 AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
 {
-    return __sync_val_compare_and_swap(addr, old_val, new_val);
+  return __sync_val_compare_and_swap(addr, old_val, new_val);
 }
-# define AO_HAVE_fetch_compare_and_swap
+#define AO_HAVE_fetch_compare_and_swap