]> granicus.if.org Git - libatomic_ops/commitdiff
Move 'unsigned' keyword to XCTYPE in generalize-small template
authorIvan Maidanski <ivmai@mail.ru>
Tue, 1 Jan 2013 16:26:28 +0000 (20:26 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 2 Jan 2013 09:27:37 +0000 (13:27 +0400)
(code refactoring)

* src/Makefile.am (atomic_ops/generalize-small.h): Add trailing '_'
to XSIZE and to its replacement; add "unsigned" prefix to the types
replacing XCTYPE (using empty comment as a delimiter between
"unsigned" keyword and char/short).
* src/atomic_ops/generalize-small.template: Remove "unsigned" keyword
at every XCTYPE.
* src/atomic_ops/generalize-small.h: Regenerate.

src/Makefile.am
src/atomic_ops/generalize-small.h
src/atomic_ops/generalize-small.template

index 2384182c26c1d950c74ac73fd00e7bf2be3ebda1..f5bad9299a8edcd8576eb9829a7dd6ca305689cd 100644 (file)
@@ -79,6 +79,6 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
           atomic_ops/sysdeps/sunc/x86.h
 
 atomic_ops/generalize-small.h: atomic_ops/generalize-small.template
-       sed -e s:XSIZE:char:g -e s:XCTYPE:char:g $? > $@
-       sed -e s:XSIZE:short:g -e s:XCTYPE:short:g $? >> $@
-       sed -e s:XSIZE:int:g -e s:XCTYPE:int:g $? >> $@
+       sed -e s:XSIZE_:char_:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+       sed -e s:XSIZE_:short_:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+       sed -e s:XSIZE_:int_:g -e s:XCTYPE:unsigned:g $? >> $@
index 7e27db67fcc7186916d73f4d383b31bd347d7617..44d16ff5f556fb19647fafcdefa8af7cff4f6319 100644 (file)
 
 #if defined(AO_HAVE_char_load) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_char_load_acquire)
-  AO_INLINE unsigned char
-  AO_char_load_acquire(const volatile unsigned char *addr)
+  AO_INLINE unsigned/**/char
+  AO_char_load_acquire(const volatile unsigned/**/char *addr)
   {
-    unsigned char result = AO_char_load(addr);
+    unsigned/**/char result = AO_char_load(addr);
+
     /* Acquire barrier would be useless, since the load could be delayed    */
     /* beyond it.                                                           */
     AO_nop_full();
 
 #if defined(AO_HAVE_char_load) && defined(AO_HAVE_nop_read) \
     && !defined(AO_HAVE_char_load_read)
-  AO_INLINE unsigned char
-  AO_char_load_read(const volatile unsigned char *addr)
+  AO_INLINE unsigned/**/char
+  AO_char_load_read(const volatile unsigned/**/char *addr)
   {
-    unsigned char result = AO_char_load(addr);
+    unsigned/**/char result = AO_char_load(addr);
+
     /* Acquire barrier would be useless, since the load could be delayed    */
     /* beyond it.                                                           */
     AO_nop_read();
 # define AO_HAVE_char_store_full
 #endif
 
-/* AO_char_compare_and_swap */
+/* char_compare_and_swap */
 #if defined(AO_HAVE_char_fetch_compare_and_swap_full) \
     && !defined(AO_HAVE_char_compare_and_swap_full)
   AO_INLINE int
-  AO_char_compare_and_swap_full(volatile unsigned char *addr,
-                                 unsigned char old_val,
-                                 unsigned char new_val)
+  AO_char_compare_and_swap_full(volatile unsigned/**/char *addr, unsigned/**/char old_val,
+                                 unsigned/**/char new_val)
   {
     return AO_char_fetch_compare_and_swap_full(addr, old_val, new_val)
              == old_val;
 #if defined(AO_HAVE_char_fetch_compare_and_swap_acquire) \
     && !defined(AO_HAVE_char_compare_and_swap_acquire)
   AO_INLINE int
-  AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
-                                    unsigned char old_val,
-                                    unsigned char new_val)
+  AO_char_compare_and_swap_acquire(volatile unsigned/**/char *addr, unsigned/**/char old_val,
+                                    unsigned/**/char new_val)
   {
     return AO_char_fetch_compare_and_swap_acquire(addr, old_val, new_val)
              == old_val;
 #if defined(AO_HAVE_char_fetch_compare_and_swap_release) \
     && !defined(AO_HAVE_char_compare_and_swap_release)
   AO_INLINE int
-  AO_char_compare_and_swap_release(volatile unsigned char *addr,
-                                    unsigned char old_val,
-                                    unsigned char new_val)
+  AO_char_compare_and_swap_release(volatile unsigned/**/char *addr, unsigned/**/char old_val,
+                                    unsigned/**/char new_val)
   {
     return AO_char_fetch_compare_and_swap_release(addr, old_val, new_val)
              == old_val;
 /* char_fetch_and_add */
 #if defined(AO_HAVE_char_compare_and_swap_full) \
     && !defined(AO_HAVE_char_fetch_and_add_full)
-  AO_INLINE unsigned char
-  AO_char_fetch_and_add_full(volatile unsigned char *addr,
-                              unsigned char incr)
+  AO_INLINE unsigned/**/char
+  AO_char_fetch_and_add_full(volatile unsigned/**/char *addr, unsigned/**/char incr)
   {
-    unsigned char old;
+    unsigned/**/char old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_char_compare_and_swap_acquire) \
     && !defined(AO_HAVE_char_fetch_and_add_acquire)
-  AO_INLINE unsigned char
-  AO_char_fetch_and_add_acquire(volatile unsigned char *addr,
-                                 unsigned char incr)
+  AO_INLINE unsigned/**/char
+  AO_char_fetch_and_add_acquire(volatile unsigned/**/char *addr, unsigned/**/char incr)
   {
-    unsigned char old;
+    unsigned/**/char old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_char_compare_and_swap_release) \
     && !defined(AO_HAVE_char_fetch_and_add_release)
-  AO_INLINE unsigned char
-  AO_char_fetch_and_add_release(volatile unsigned char *addr,
-                                 unsigned char incr)
+  AO_INLINE unsigned/**/char
+  AO_char_fetch_and_add_release(volatile unsigned/**/char *addr, unsigned/**/char incr)
   {
-    unsigned char old;
+    unsigned/**/char old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_char_compare_and_swap) \
     && !defined(AO_HAVE_char_fetch_and_add)
-  AO_INLINE unsigned char
-  AO_char_fetch_and_add(volatile unsigned char *addr, unsigned char incr)
+  AO_INLINE unsigned/**/char
+  AO_char_fetch_and_add(volatile unsigned/**/char *addr, unsigned/**/char incr)
   {
-    unsigned char old;
+    unsigned/**/char old;
+
     do
       {
         old = *addr;
 #if defined(AO_HAVE_char_fetch_and_add_full) \
     && !defined(AO_HAVE_char_fetch_and_sub1_full)
 # define AO_char_fetch_and_sub1_full(addr) \
-                AO_char_fetch_and_add_full(addr,(unsigned char)(-1))
+                AO_char_fetch_and_add_full(addr, (unsigned/**/char)(-1))
 # define AO_HAVE_char_fetch_and_sub1_full
 #endif
 #if defined(AO_HAVE_char_fetch_and_add_release) \
     && !defined(AO_HAVE_char_fetch_and_sub1_release)
 # define AO_char_fetch_and_sub1_release(addr) \
-                AO_char_fetch_and_add_release(addr,(unsigned char)(-1))
+                AO_char_fetch_and_add_release(addr, (unsigned/**/char)(-1))
 # define AO_HAVE_char_fetch_and_sub1_release
 #endif
 #if defined(AO_HAVE_char_fetch_and_add_acquire) \
     && !defined(AO_HAVE_char_fetch_and_sub1_acquire)
 # define AO_char_fetch_and_sub1_acquire(addr) \
-                AO_char_fetch_and_add_acquire(addr,(unsigned char)(-1))
+                AO_char_fetch_and_add_acquire(addr, (unsigned/**/char)(-1))
 # define AO_HAVE_char_fetch_and_sub1_acquire
 #endif
 #if defined(AO_HAVE_char_fetch_and_add_write) \
     && !defined(AO_HAVE_char_fetch_and_sub1_write)
 # define AO_char_fetch_and_sub1_write(addr) \
-                AO_char_fetch_and_add_write(addr,(unsigned char)(-1))
+                AO_char_fetch_and_add_write(addr, (unsigned/**/char)(-1))
 # define AO_HAVE_char_fetch_and_sub1_write
 #endif
 #if defined(AO_HAVE_char_fetch_and_add_read) \
     && !defined(AO_HAVE_char_fetch_and_sub1_read)
 # define AO_char_fetch_and_sub1_read(addr) \
-                AO_char_fetch_and_add_read(addr,(unsigned char)(-1))
+                AO_char_fetch_and_add_read(addr, (unsigned/**/char)(-1))
 # define AO_HAVE_char_fetch_and_sub1_read
 #endif
 #if defined(AO_HAVE_char_fetch_and_add_release_write) \
     && !defined(AO_HAVE_char_fetch_and_sub1_release_write)
 # define AO_char_fetch_and_sub1_release_write(addr) \
-        AO_char_fetch_and_add_release_write(addr,(unsigned char)(-1))
+                AO_char_fetch_and_add_release_write(addr, (unsigned/**/char)(-1))
 # define AO_HAVE_char_fetch_and_sub1_release_write
 #endif
 #if defined(AO_HAVE_char_fetch_and_add_acquire_read) \
     && !defined(AO_HAVE_char_fetch_and_sub1_acquire_read)
 # define AO_char_fetch_and_sub1_acquire_read(addr) \
-        AO_char_fetch_and_add_acquire_read(addr,(unsigned char)(-1))
+                AO_char_fetch_and_add_acquire_read(addr, (unsigned/**/char)(-1))
 # define AO_HAVE_char_fetch_and_sub1_acquire_read
 #endif
 #if defined(AO_HAVE_char_fetch_and_add) \
     && !defined(AO_HAVE_char_fetch_and_sub1)
 # define AO_char_fetch_and_sub1(addr) \
-                AO_char_fetch_and_add(addr,(unsigned char)(-1))
+                AO_char_fetch_and_add(addr, (unsigned/**/char)(-1))
 # define AO_HAVE_char_fetch_and_sub1
 #endif
 
 
 #if defined(AO_HAVE_short_load) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_short_load_acquire)
-  AO_INLINE unsigned short
-  AO_short_load_acquire(const volatile unsigned short *addr)
+  AO_INLINE unsigned/**/short
+  AO_short_load_acquire(const volatile unsigned/**/short *addr)
   {
-    unsigned short result = AO_short_load(addr);
+    unsigned/**/short result = AO_short_load(addr);
+
     /* Acquire barrier would be useless, since the load could be delayed    */
     /* beyond it.                                                           */
     AO_nop_full();
 
 #if defined(AO_HAVE_short_load) && defined(AO_HAVE_nop_read) \
     && !defined(AO_HAVE_short_load_read)
-  AO_INLINE unsigned short
-  AO_short_load_read(const volatile unsigned short *addr)
+  AO_INLINE unsigned/**/short
+  AO_short_load_read(const volatile unsigned/**/short *addr)
   {
-    unsigned short result = AO_short_load(addr);
+    unsigned/**/short result = AO_short_load(addr);
+
     /* Acquire barrier would be useless, since the load could be delayed    */
     /* beyond it.                                                           */
     AO_nop_read();
 # define AO_HAVE_short_store_full
 #endif
 
-/* AO_short_compare_and_swap */
+/* short_compare_and_swap */
 #if defined(AO_HAVE_short_fetch_compare_and_swap_full) \
     && !defined(AO_HAVE_short_compare_and_swap_full)
   AO_INLINE int
-  AO_short_compare_and_swap_full(volatile unsigned short *addr,
-                                 unsigned short old_val,
-                                 unsigned short new_val)
+  AO_short_compare_and_swap_full(volatile unsigned/**/short *addr, unsigned/**/short old_val,
+                                 unsigned/**/short new_val)
   {
     return AO_short_fetch_compare_and_swap_full(addr, old_val, new_val)
              == old_val;
 #if defined(AO_HAVE_short_fetch_compare_and_swap_acquire) \
     && !defined(AO_HAVE_short_compare_and_swap_acquire)
   AO_INLINE int
-  AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
-                                    unsigned short old_val,
-                                    unsigned short new_val)
+  AO_short_compare_and_swap_acquire(volatile unsigned/**/short *addr, unsigned/**/short old_val,
+                                    unsigned/**/short new_val)
   {
     return AO_short_fetch_compare_and_swap_acquire(addr, old_val, new_val)
              == old_val;
 #if defined(AO_HAVE_short_fetch_compare_and_swap_release) \
     && !defined(AO_HAVE_short_compare_and_swap_release)
   AO_INLINE int
-  AO_short_compare_and_swap_release(volatile unsigned short *addr,
-                                    unsigned short old_val,
-                                    unsigned short new_val)
+  AO_short_compare_and_swap_release(volatile unsigned/**/short *addr, unsigned/**/short old_val,
+                                    unsigned/**/short new_val)
   {
     return AO_short_fetch_compare_and_swap_release(addr, old_val, new_val)
              == old_val;
 /* short_fetch_and_add */
 #if defined(AO_HAVE_short_compare_and_swap_full) \
     && !defined(AO_HAVE_short_fetch_and_add_full)
-  AO_INLINE unsigned short
-  AO_short_fetch_and_add_full(volatile unsigned short *addr,
-                              unsigned short incr)
+  AO_INLINE unsigned/**/short
+  AO_short_fetch_and_add_full(volatile unsigned/**/short *addr, unsigned/**/short incr)
   {
-    unsigned short old;
+    unsigned/**/short old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_short_compare_and_swap_acquire) \
     && !defined(AO_HAVE_short_fetch_and_add_acquire)
-  AO_INLINE unsigned short
-  AO_short_fetch_and_add_acquire(volatile unsigned short *addr,
-                                 unsigned short incr)
+  AO_INLINE unsigned/**/short
+  AO_short_fetch_and_add_acquire(volatile unsigned/**/short *addr, unsigned/**/short incr)
   {
-    unsigned short old;
+    unsigned/**/short old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_short_compare_and_swap_release) \
     && !defined(AO_HAVE_short_fetch_and_add_release)
-  AO_INLINE unsigned short
-  AO_short_fetch_and_add_release(volatile unsigned short *addr,
-                                 unsigned short incr)
+  AO_INLINE unsigned/**/short
+  AO_short_fetch_and_add_release(volatile unsigned/**/short *addr, unsigned/**/short incr)
   {
-    unsigned short old;
+    unsigned/**/short old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_short_compare_and_swap) \
     && !defined(AO_HAVE_short_fetch_and_add)
-  AO_INLINE unsigned short
-  AO_short_fetch_and_add(volatile unsigned short *addr, unsigned short incr)
+  AO_INLINE unsigned/**/short
+  AO_short_fetch_and_add(volatile unsigned/**/short *addr, unsigned/**/short incr)
   {
-    unsigned short old;
+    unsigned/**/short old;
+
     do
       {
         old = *addr;
 #if defined(AO_HAVE_short_fetch_and_add_full) \
     && !defined(AO_HAVE_short_fetch_and_sub1_full)
 # define AO_short_fetch_and_sub1_full(addr) \
-                AO_short_fetch_and_add_full(addr,(unsigned short)(-1))
+                AO_short_fetch_and_add_full(addr, (unsigned/**/short)(-1))
 # define AO_HAVE_short_fetch_and_sub1_full
 #endif
 #if defined(AO_HAVE_short_fetch_and_add_release) \
     && !defined(AO_HAVE_short_fetch_and_sub1_release)
 # define AO_short_fetch_and_sub1_release(addr) \
-                AO_short_fetch_and_add_release(addr,(unsigned short)(-1))
+                AO_short_fetch_and_add_release(addr, (unsigned/**/short)(-1))
 # define AO_HAVE_short_fetch_and_sub1_release
 #endif
 #if defined(AO_HAVE_short_fetch_and_add_acquire) \
     && !defined(AO_HAVE_short_fetch_and_sub1_acquire)
 # define AO_short_fetch_and_sub1_acquire(addr) \
-                AO_short_fetch_and_add_acquire(addr,(unsigned short)(-1))
+                AO_short_fetch_and_add_acquire(addr, (unsigned/**/short)(-1))
 # define AO_HAVE_short_fetch_and_sub1_acquire
 #endif
 #if defined(AO_HAVE_short_fetch_and_add_write) \
     && !defined(AO_HAVE_short_fetch_and_sub1_write)
 # define AO_short_fetch_and_sub1_write(addr) \
-                AO_short_fetch_and_add_write(addr,(unsigned short)(-1))
+                AO_short_fetch_and_add_write(addr, (unsigned/**/short)(-1))
 # define AO_HAVE_short_fetch_and_sub1_write
 #endif
 #if defined(AO_HAVE_short_fetch_and_add_read) \
     && !defined(AO_HAVE_short_fetch_and_sub1_read)
 # define AO_short_fetch_and_sub1_read(addr) \
-                AO_short_fetch_and_add_read(addr,(unsigned short)(-1))
+                AO_short_fetch_and_add_read(addr, (unsigned/**/short)(-1))
 # define AO_HAVE_short_fetch_and_sub1_read
 #endif
 #if defined(AO_HAVE_short_fetch_and_add_release_write) \
     && !defined(AO_HAVE_short_fetch_and_sub1_release_write)
 # define AO_short_fetch_and_sub1_release_write(addr) \
-        AO_short_fetch_and_add_release_write(addr,(unsigned short)(-1))
+                AO_short_fetch_and_add_release_write(addr, (unsigned/**/short)(-1))
 # define AO_HAVE_short_fetch_and_sub1_release_write
 #endif
 #if defined(AO_HAVE_short_fetch_and_add_acquire_read) \
     && !defined(AO_HAVE_short_fetch_and_sub1_acquire_read)
 # define AO_short_fetch_and_sub1_acquire_read(addr) \
-        AO_short_fetch_and_add_acquire_read(addr,(unsigned short)(-1))
+                AO_short_fetch_and_add_acquire_read(addr, (unsigned/**/short)(-1))
 # define AO_HAVE_short_fetch_and_sub1_acquire_read
 #endif
 #if defined(AO_HAVE_short_fetch_and_add) \
     && !defined(AO_HAVE_short_fetch_and_sub1)
 # define AO_short_fetch_and_sub1(addr) \
-                AO_short_fetch_and_add(addr,(unsigned short)(-1))
+                AO_short_fetch_and_add(addr, (unsigned/**/short)(-1))
 # define AO_HAVE_short_fetch_and_sub1
 #endif
 
 
 #if defined(AO_HAVE_int_load) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_int_load_acquire)
-  AO_INLINE unsigned int
-  AO_int_load_acquire(const volatile unsigned int *addr)
+  AO_INLINE unsigned
+  AO_int_load_acquire(const volatile unsigned *addr)
   {
-    unsigned int result = AO_int_load(addr);
+    unsigned result = AO_int_load(addr);
+
     /* Acquire barrier would be useless, since the load could be delayed    */
     /* beyond it.                                                           */
     AO_nop_full();
 
 #if defined(AO_HAVE_int_load) && defined(AO_HAVE_nop_read) \
     && !defined(AO_HAVE_int_load_read)
-  AO_INLINE unsigned int
-  AO_int_load_read(const volatile unsigned int *addr)
+  AO_INLINE unsigned
+  AO_int_load_read(const volatile unsigned *addr)
   {
-    unsigned int result = AO_int_load(addr);
+    unsigned result = AO_int_load(addr);
+
     /* Acquire barrier would be useless, since the load could be delayed    */
     /* beyond it.                                                           */
     AO_nop_read();
 # define AO_HAVE_int_store_full
 #endif
 
-/* AO_int_compare_and_swap */
+/* int_compare_and_swap */
 #if defined(AO_HAVE_int_fetch_compare_and_swap_full) \
     && !defined(AO_HAVE_int_compare_and_swap_full)
   AO_INLINE int
-  AO_int_compare_and_swap_full(volatile unsigned int *addr,
-                                 unsigned int old_val,
-                                 unsigned int new_val)
+  AO_int_compare_and_swap_full(volatile unsigned *addr, unsigned old_val,
+                                 unsigned new_val)
   {
     return AO_int_fetch_compare_and_swap_full(addr, old_val, new_val)
              == old_val;
 #if defined(AO_HAVE_int_fetch_compare_and_swap_acquire) \
     && !defined(AO_HAVE_int_compare_and_swap_acquire)
   AO_INLINE int
-  AO_int_compare_and_swap_acquire(volatile unsigned int *addr,
-                                    unsigned int old_val,
-                                    unsigned int new_val)
+  AO_int_compare_and_swap_acquire(volatile unsigned *addr, unsigned old_val,
+                                    unsigned new_val)
   {
     return AO_int_fetch_compare_and_swap_acquire(addr, old_val, new_val)
              == old_val;
 #if defined(AO_HAVE_int_fetch_compare_and_swap_release) \
     && !defined(AO_HAVE_int_compare_and_swap_release)
   AO_INLINE int
-  AO_int_compare_and_swap_release(volatile unsigned int *addr,
-                                    unsigned int old_val,
-                                    unsigned int new_val)
+  AO_int_compare_and_swap_release(volatile unsigned *addr, unsigned old_val,
+                                    unsigned new_val)
   {
     return AO_int_fetch_compare_and_swap_release(addr, old_val, new_val)
              == old_val;
 /* int_fetch_and_add */
 #if defined(AO_HAVE_int_compare_and_swap_full) \
     && !defined(AO_HAVE_int_fetch_and_add_full)
-  AO_INLINE unsigned int
-  AO_int_fetch_and_add_full(volatile unsigned int *addr,
-                              unsigned int incr)
+  AO_INLINE unsigned
+  AO_int_fetch_and_add_full(volatile unsigned *addr, unsigned incr)
   {
-    unsigned int old;
+    unsigned old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_int_compare_and_swap_acquire) \
     && !defined(AO_HAVE_int_fetch_and_add_acquire)
-  AO_INLINE unsigned int
-  AO_int_fetch_and_add_acquire(volatile unsigned int *addr,
-                                 unsigned int incr)
+  AO_INLINE unsigned
+  AO_int_fetch_and_add_acquire(volatile unsigned *addr, unsigned incr)
   {
-    unsigned int old;
+    unsigned old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_int_compare_and_swap_release) \
     && !defined(AO_HAVE_int_fetch_and_add_release)
-  AO_INLINE unsigned int
-  AO_int_fetch_and_add_release(volatile unsigned int *addr,
-                                 unsigned int incr)
+  AO_INLINE unsigned
+  AO_int_fetch_and_add_release(volatile unsigned *addr, unsigned incr)
   {
-    unsigned int old;
+    unsigned old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_int_compare_and_swap) \
     && !defined(AO_HAVE_int_fetch_and_add)
-  AO_INLINE unsigned int
-  AO_int_fetch_and_add(volatile unsigned int *addr, unsigned int incr)
+  AO_INLINE unsigned
+  AO_int_fetch_and_add(volatile unsigned *addr, unsigned incr)
   {
-    unsigned int old;
+    unsigned old;
+
     do
       {
         old = *addr;
 #if defined(AO_HAVE_int_fetch_and_add_full) \
     && !defined(AO_HAVE_int_fetch_and_sub1_full)
 # define AO_int_fetch_and_sub1_full(addr) \
-                AO_int_fetch_and_add_full(addr,(unsigned int)(-1))
+                AO_int_fetch_and_add_full(addr, (unsigned)(-1))
 # define AO_HAVE_int_fetch_and_sub1_full
 #endif
 #if defined(AO_HAVE_int_fetch_and_add_release) \
     && !defined(AO_HAVE_int_fetch_and_sub1_release)
 # define AO_int_fetch_and_sub1_release(addr) \
-                AO_int_fetch_and_add_release(addr,(unsigned int)(-1))
+                AO_int_fetch_and_add_release(addr, (unsigned)(-1))
 # define AO_HAVE_int_fetch_and_sub1_release
 #endif
 #if defined(AO_HAVE_int_fetch_and_add_acquire) \
     && !defined(AO_HAVE_int_fetch_and_sub1_acquire)
 # define AO_int_fetch_and_sub1_acquire(addr) \
-                AO_int_fetch_and_add_acquire(addr,(unsigned int)(-1))
+                AO_int_fetch_and_add_acquire(addr, (unsigned)(-1))
 # define AO_HAVE_int_fetch_and_sub1_acquire
 #endif
 #if defined(AO_HAVE_int_fetch_and_add_write) \
     && !defined(AO_HAVE_int_fetch_and_sub1_write)
 # define AO_int_fetch_and_sub1_write(addr) \
-                AO_int_fetch_and_add_write(addr,(unsigned int)(-1))
+                AO_int_fetch_and_add_write(addr, (unsigned)(-1))
 # define AO_HAVE_int_fetch_and_sub1_write
 #endif
 #if defined(AO_HAVE_int_fetch_and_add_read) \
     && !defined(AO_HAVE_int_fetch_and_sub1_read)
 # define AO_int_fetch_and_sub1_read(addr) \
-                AO_int_fetch_and_add_read(addr,(unsigned int)(-1))
+                AO_int_fetch_and_add_read(addr, (unsigned)(-1))
 # define AO_HAVE_int_fetch_and_sub1_read
 #endif
 #if defined(AO_HAVE_int_fetch_and_add_release_write) \
     && !defined(AO_HAVE_int_fetch_and_sub1_release_write)
 # define AO_int_fetch_and_sub1_release_write(addr) \
-        AO_int_fetch_and_add_release_write(addr,(unsigned int)(-1))
+                AO_int_fetch_and_add_release_write(addr, (unsigned)(-1))
 # define AO_HAVE_int_fetch_and_sub1_release_write
 #endif
 #if defined(AO_HAVE_int_fetch_and_add_acquire_read) \
     && !defined(AO_HAVE_int_fetch_and_sub1_acquire_read)
 # define AO_int_fetch_and_sub1_acquire_read(addr) \
-        AO_int_fetch_and_add_acquire_read(addr,(unsigned int)(-1))
+                AO_int_fetch_and_add_acquire_read(addr, (unsigned)(-1))
 # define AO_HAVE_int_fetch_and_sub1_acquire_read
 #endif
 #if defined(AO_HAVE_int_fetch_and_add) \
     && !defined(AO_HAVE_int_fetch_and_sub1)
 # define AO_int_fetch_and_sub1(addr) \
-                AO_int_fetch_and_add(addr,(unsigned int)(-1))
+                AO_int_fetch_and_add(addr, (unsigned)(-1))
 # define AO_HAVE_int_fetch_and_sub1
 #endif
 
index 19fddd6de7ce782e7e8d47b6e42712591bc20c1a..5f5bb9ab77eb5a2adb685d28f147842ed085f47a 100644 (file)
 
 #if defined(AO_HAVE_XSIZE_load) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_XSIZE_load_acquire)
-  AO_INLINE unsigned XCTYPE
-  AO_XSIZE_load_acquire(const volatile unsigned XCTYPE *addr)
+  AO_INLINE XCTYPE
+  AO_XSIZE_load_acquire(const volatile XCTYPE *addr)
   {
-    unsigned XCTYPE result = AO_XSIZE_load(addr);
+    XCTYPE result = AO_XSIZE_load(addr);
+
     /* Acquire barrier would be useless, since the load could be delayed    */
     /* beyond it.                                                           */
     AO_nop_full();
 
 #if defined(AO_HAVE_XSIZE_load) && defined(AO_HAVE_nop_read) \
     && !defined(AO_HAVE_XSIZE_load_read)
-  AO_INLINE unsigned XCTYPE
-  AO_XSIZE_load_read(const volatile unsigned XCTYPE *addr)
+  AO_INLINE XCTYPE
+  AO_XSIZE_load_read(const volatile XCTYPE *addr)
   {
-    unsigned XCTYPE result = AO_XSIZE_load(addr);
+    XCTYPE result = AO_XSIZE_load(addr);
+
     /* Acquire barrier would be useless, since the load could be delayed    */
     /* beyond it.                                                           */
     AO_nop_read();
 # define AO_HAVE_XSIZE_store_full
 #endif
 
-/* AO_XSIZE_compare_and_swap */
+/* XSIZE_compare_and_swap */
 #if defined(AO_HAVE_XSIZE_fetch_compare_and_swap_full) \
     && !defined(AO_HAVE_XSIZE_compare_and_swap_full)
   AO_INLINE int
-  AO_XSIZE_compare_and_swap_full(volatile unsigned XCTYPE *addr,
-                                 unsigned XCTYPE old_val,
-                                 unsigned XCTYPE new_val)
+  AO_XSIZE_compare_and_swap_full(volatile XCTYPE *addr, XCTYPE old_val,
+                                 XCTYPE new_val)
   {
     return AO_XSIZE_fetch_compare_and_swap_full(addr, old_val, new_val)
              == old_val;
 #if defined(AO_HAVE_XSIZE_fetch_compare_and_swap_acquire) \
     && !defined(AO_HAVE_XSIZE_compare_and_swap_acquire)
   AO_INLINE int
-  AO_XSIZE_compare_and_swap_acquire(volatile unsigned XCTYPE *addr,
-                                    unsigned XCTYPE old_val,
-                                    unsigned XCTYPE new_val)
+  AO_XSIZE_compare_and_swap_acquire(volatile XCTYPE *addr, XCTYPE old_val,
+                                    XCTYPE new_val)
   {
     return AO_XSIZE_fetch_compare_and_swap_acquire(addr, old_val, new_val)
              == old_val;
 #if defined(AO_HAVE_XSIZE_fetch_compare_and_swap_release) \
     && !defined(AO_HAVE_XSIZE_compare_and_swap_release)
   AO_INLINE int
-  AO_XSIZE_compare_and_swap_release(volatile unsigned XCTYPE *addr,
-                                    unsigned XCTYPE old_val,
-                                    unsigned XCTYPE new_val)
+  AO_XSIZE_compare_and_swap_release(volatile XCTYPE *addr, XCTYPE old_val,
+                                    XCTYPE new_val)
   {
     return AO_XSIZE_fetch_compare_and_swap_release(addr, old_val, new_val)
              == old_val;
 /* XSIZE_fetch_and_add */
 #if defined(AO_HAVE_XSIZE_compare_and_swap_full) \
     && !defined(AO_HAVE_XSIZE_fetch_and_add_full)
-  AO_INLINE unsigned XCTYPE
-  AO_XSIZE_fetch_and_add_full(volatile unsigned XCTYPE *addr,
-                              unsigned XCTYPE incr)
+  AO_INLINE XCTYPE
+  AO_XSIZE_fetch_and_add_full(volatile XCTYPE *addr, XCTYPE incr)
   {
-    unsigned XCTYPE old;
+    XCTYPE old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_XSIZE_compare_and_swap_acquire) \
     && !defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
-  AO_INLINE unsigned XCTYPE
-  AO_XSIZE_fetch_and_add_acquire(volatile unsigned XCTYPE *addr,
-                                 unsigned XCTYPE incr)
+  AO_INLINE XCTYPE
+  AO_XSIZE_fetch_and_add_acquire(volatile XCTYPE *addr, XCTYPE incr)
   {
-    unsigned XCTYPE old;
+    XCTYPE old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_XSIZE_compare_and_swap_release) \
     && !defined(AO_HAVE_XSIZE_fetch_and_add_release)
-  AO_INLINE unsigned XCTYPE
-  AO_XSIZE_fetch_and_add_release(volatile unsigned XCTYPE *addr,
-                                 unsigned XCTYPE incr)
+  AO_INLINE XCTYPE
+  AO_XSIZE_fetch_and_add_release(volatile XCTYPE *addr, XCTYPE incr)
   {
-    unsigned XCTYPE old;
+    XCTYPE old;
+
     do
       {
         old = *addr;
 
 #if defined(AO_HAVE_XSIZE_compare_and_swap) \
     && !defined(AO_HAVE_XSIZE_fetch_and_add)
-  AO_INLINE unsigned XCTYPE
-  AO_XSIZE_fetch_and_add(volatile unsigned XCTYPE *addr, unsigned XCTYPE incr)
+  AO_INLINE XCTYPE
+  AO_XSIZE_fetch_and_add(volatile XCTYPE *addr, XCTYPE incr)
   {
-    unsigned XCTYPE old;
+    XCTYPE old;
+
     do
       {
         old = *addr;
 #if defined(AO_HAVE_XSIZE_fetch_and_add_full) \
     && !defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
 # define AO_XSIZE_fetch_and_sub1_full(addr) \
-                AO_XSIZE_fetch_and_add_full(addr,(unsigned XCTYPE)(-1))
+                AO_XSIZE_fetch_and_add_full(addr, (XCTYPE)(-1))
 # define AO_HAVE_XSIZE_fetch_and_sub1_full
 #endif
 #if defined(AO_HAVE_XSIZE_fetch_and_add_release) \
     && !defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
 # define AO_XSIZE_fetch_and_sub1_release(addr) \
-                AO_XSIZE_fetch_and_add_release(addr,(unsigned XCTYPE)(-1))
+                AO_XSIZE_fetch_and_add_release(addr, (XCTYPE)(-1))
 # define AO_HAVE_XSIZE_fetch_and_sub1_release
 #endif
 #if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) \
     && !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
 # define AO_XSIZE_fetch_and_sub1_acquire(addr) \
-                AO_XSIZE_fetch_and_add_acquire(addr,(unsigned XCTYPE)(-1))
+                AO_XSIZE_fetch_and_add_acquire(addr, (XCTYPE)(-1))
 # define AO_HAVE_XSIZE_fetch_and_sub1_acquire
 #endif
 #if defined(AO_HAVE_XSIZE_fetch_and_add_write) \
     && !defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
 # define AO_XSIZE_fetch_and_sub1_write(addr) \
-                AO_XSIZE_fetch_and_add_write(addr,(unsigned XCTYPE)(-1))
+                AO_XSIZE_fetch_and_add_write(addr, (XCTYPE)(-1))
 # define AO_HAVE_XSIZE_fetch_and_sub1_write
 #endif
 #if defined(AO_HAVE_XSIZE_fetch_and_add_read) \
     && !defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
 # define AO_XSIZE_fetch_and_sub1_read(addr) \
-                AO_XSIZE_fetch_and_add_read(addr,(unsigned XCTYPE)(-1))
+                AO_XSIZE_fetch_and_add_read(addr, (XCTYPE)(-1))
 # define AO_HAVE_XSIZE_fetch_and_sub1_read
 #endif
 #if defined(AO_HAVE_XSIZE_fetch_and_add_release_write) \
     && !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write)
 # define AO_XSIZE_fetch_and_sub1_release_write(addr) \
-        AO_XSIZE_fetch_and_add_release_write(addr,(unsigned XCTYPE)(-1))
+                AO_XSIZE_fetch_and_add_release_write(addr, (XCTYPE)(-1))
 # define AO_HAVE_XSIZE_fetch_and_sub1_release_write
 #endif
 #if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) \
     && !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read)
 # define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
-        AO_XSIZE_fetch_and_add_acquire_read(addr,(unsigned XCTYPE)(-1))
+                AO_XSIZE_fetch_and_add_acquire_read(addr, (XCTYPE)(-1))
 # define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
 #endif
 #if defined(AO_HAVE_XSIZE_fetch_and_add) \
     && !defined(AO_HAVE_XSIZE_fetch_and_sub1)
 # define AO_XSIZE_fetch_and_sub1(addr) \
-                AO_XSIZE_fetch_and_add(addr,(unsigned XCTYPE)(-1))
+                AO_XSIZE_fetch_and_add(addr, (XCTYPE)(-1))
 # define AO_HAVE_XSIZE_fetch_and_sub1
 #endif