]> granicus.if.org Git - libatomic_ops/commitdiff
Fix generalized AO_char/short_fetch_and_add CTYPE args
authorIvan Maidanski <ivmai@mail.ru>
Sun, 1 Jul 2012 08:45:23 +0000 (12:45 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 2 Jul 2012 07:02:46 +0000 (11:02 +0400)
(fix missing 'unsigned' for generalized fetch_and_add primitives)

* src/atomic_ops/generalize-small.template
(AO_XSIZE_fetch_and_add_full,
AO_XSIZE_fetch_and_add_acquire, AO_XSIZE_fetch_and_add_release):
Fix type of function arguments (or local variables) by adding
'unsigned' to XCTYPE.
* src/atomic_ops/generalize-small.h: Regenerate.

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

index c3a44035da0ab4d4b5d3c1ca10d68893af7d9bee..7c2baa68201e8fb225fe525c7eea583ba136f685 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 char
+  AO_INLINE unsigned 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 char
+  AO_INLINE unsigned 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 char
+  AO_INLINE unsigned 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 short
+  AO_INLINE unsigned 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 short
+  AO_INLINE unsigned 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 short
+  AO_INLINE unsigned 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 int
+  AO_INLINE unsigned 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 int
+  AO_INLINE unsigned 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 int
+  AO_INLINE unsigned int
   AO_int_fetch_and_add_release(volatile unsigned int *addr,
                                  unsigned int incr)
   {
index 517a8a7c14349fd9dd4a43b13930384ec48d9eaa..0f637324b60d652e498f11382c4f6fbe1d8bfd38 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 XCTYPE
+  AO_INLINE unsigned 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 XCTYPE
+  AO_INLINE unsigned 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 XCTYPE
+  AO_INLINE unsigned XCTYPE
   AO_XSIZE_fetch_and_add_release(volatile unsigned XCTYPE *addr,
                                  unsigned XCTYPE incr)
   {