]> granicus.if.org Git - libatomic_ops/commitdiff
Fix AO_compare_and_swap_full (GCC MIPS, PowerPC) returned value type
authorIvan Maidanski <ivmai@mail.ru>
Mon, 24 Oct 2011 15:05:31 +0000 (19:05 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 24 Oct 2011 15:05:31 +0000 (19:05 +0400)
* src/atomic_ops/sysdeps/gcc/mips.h (AO_compare_and_swap_full):
Change "result" local variable type from AO_t to int.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_compare_and_swap_full):
Likewise.

src/atomic_ops/sysdeps/gcc/mips.h
src/atomic_ops/sysdeps/gcc/powerpc.h

index 2e1e9799eda95a457eb6ac61bc4d8916722a0532..527a34741a663fab11582e0bfbab36120533c90a 100644 (file)
@@ -86,7 +86,7 @@ AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
 
 AO_INLINE int
 AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_t result;
+  int result;
   AO_nop_full();
   result = AO_compare_and_swap(addr, old, new_val);
   AO_nop_full();
index 2f90dc47f00c9d9df6fe3b92b4d522857575cd57..69ec05b14897f9b66c0cda35faeff7400a0d8a56 100644 (file)
@@ -217,7 +217,7 @@ AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
 
 AO_INLINE int
 AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_t result;
+  int result;
   AO_lwsync();
   result = AO_compare_and_swap(addr, old, new_val);
   AO_lwsync();