This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH roland/arm-atomic] ARM: split generic and Linux-specific bits/atomic.h


This patch <http://sourceware.org/ml/libc-ports/2012-08/msg00122.html>
caused around 150 test failures for pre-v6/v7 ARM systems using the
kernel helpers, because the arguments in a call to
__arm_assisted_compare_and_exchange_val_32_acq were the wrong way
round.  I've applied this patch to fix this.

2012-09-21  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/arm/bits/atomic.h [!__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4]
	(__arch_compare_and_exchange_val_32_acq): Correct order of
	arguments of __arm_assisted_compare_and_exchange_val_32_acq.

diff --git a/ports/sysdeps/arm/bits/atomic.h b/ports/sysdeps/arm/bits/atomic.h
index 9984210..39e276f 100644
--- a/ports/sysdeps/arm/bits/atomic.h
+++ b/ports/sysdeps/arm/bits/atomic.h
@@ -58,7 +58,7 @@ void __arm_link_error (void);
   __sync_val_compare_and_swap ((mem), (oldval), (newval))
 #else
 # define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
-  __arm_assisted_compare_and_exchange_val_32_acq ((mem), (oldval), (newval))
+  __arm_assisted_compare_and_exchange_val_32_acq ((mem), (newval), (oldval))
 #endif
 
 /* We don't support atomic operations on any non-word types.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]