Fix generalized AO_<type>_fetch_and_add() return type
authorIvan Maidanski <ivmai@mail.ru>
Thu, 3 Nov 2011 14:43:52 +0000 (18:43 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 3 Nov 2011 14:43:52 +0000 (18:43 +0400)
* src/atomic_ops/generalize-small.template
(AO_XSIZE_fetch_and_add_full, AO_XSIZE_fetch_and_add_acquire,
AO_XSIZE_fetch_and_add_release): Change return type from AO_t to
XCTYPE.
* src/atomic_ops/generalize-small.h: Regenerate.

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

index 6548736..c3a4403 100644 (file)
 /* char_fetch_and_add */
 #if defined(AO_HAVE_char_compare_and_swap_full) \
     && !defined(AO_HAVE_char_fetch_and_add_full)
-  AO_INLINE AO_t
+  AO_INLINE char
   AO_char_fetch_and_add_full(volatile unsigned char *addr,
                               unsigned char incr)
   {
 
 #if defined(AO_HAVE_char_compare_and_swap_acquire) \
     && !defined(AO_HAVE_char_fetch_and_add_acquire)
-  AO_INLINE AO_t
+  AO_INLINE char
   AO_char_fetch_and_add_acquire(volatile unsigned char *addr,
                                  unsigned char incr)
   {
 
 #if defined(AO_HAVE_char_compare_and_swap_release) \
     && !defined(AO_HAVE_char_fetch_and_add_release)
-  AO_INLINE AO_t
+  AO_INLINE char
   AO_char_fetch_and_add_release(volatile unsigned char *addr,
                                  unsigned char incr)
   {
 /* short_fetch_and_add */
 #if defined(AO_HAVE_short_compare_and_swap_full) \
     && !defined(AO_HAVE_short_fetch_and_add_full)
-  AO_INLINE AO_t
+  AO_INLINE short
   AO_short_fetch_and_add_full(volatile unsigned short *addr,
                               unsigned short incr)
   {
 
 #if defined(AO_HAVE_short_compare_and_swap_acquire) \
     && !defined(AO_HAVE_short_fetch_and_add_acquire)
-  AO_INLINE AO_t
+  AO_INLINE short
   AO_short_fetch_and_add_acquire(volatile unsigned short *addr,
                                  unsigned short incr)
   {
 
 #if defined(AO_HAVE_short_compare_and_swap_release) \
     && !defined(AO_HAVE_short_fetch_and_add_release)
-  AO_INLINE AO_t
+  AO_INLINE short
   AO_short_fetch_and_add_release(volatile unsigned short *addr,
                                  unsigned short incr)
   {
 /* int_fetch_and_add */
 #if defined(AO_HAVE_int_compare_and_swap_full) \
     && !defined(AO_HAVE_int_fetch_and_add_full)
-  AO_INLINE AO_t
+  AO_INLINE int
   AO_int_fetch_and_add_full(volatile unsigned int *addr,
                               unsigned int incr)
   {
 
 #if defined(AO_HAVE_int_compare_and_swap_acquire) \
     && !defined(AO_HAVE_int_fetch_and_add_acquire)
-  AO_INLINE AO_t
+  AO_INLINE int
   AO_int_fetch_and_add_acquire(volatile unsigned int *addr,
                                  unsigned int incr)
   {
 
 #if defined(AO_HAVE_int_compare_and_swap_release) \
     && !defined(AO_HAVE_int_fetch_and_add_release)
-  AO_INLINE AO_t
+  AO_INLINE int
   AO_int_fetch_and_add_release(volatile unsigned int *addr,
                                  unsigned int incr)
   {
index 1200159..517a8a7 100644 (file)
 /* XSIZE_fetch_and_add */
 #if defined(AO_HAVE_XSIZE_compare_and_swap_full) \
     && !defined(AO_HAVE_XSIZE_fetch_and_add_full)
-  AO_INLINE AO_t
+  AO_INLINE XCTYPE
   AO_XSIZE_fetch_and_add_full(volatile unsigned XCTYPE *addr,
                               unsigned XCTYPE incr)
   {
 
 #if defined(AO_HAVE_XSIZE_compare_and_swap_acquire) \
     && !defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
-  AO_INLINE AO_t
+  AO_INLINE XCTYPE
   AO_XSIZE_fetch_and_add_acquire(volatile unsigned XCTYPE *addr,
                                  unsigned XCTYPE incr)
   {
 
 #if defined(AO_HAVE_XSIZE_compare_and_swap_release) \
     && !defined(AO_HAVE_XSIZE_fetch_and_add_release)
-  AO_INLINE AO_t
+  AO_INLINE XCTYPE
   AO_XSIZE_fetch_and_add_release(volatile unsigned XCTYPE *addr,
                                  unsigned XCTYPE incr)
   {