This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH roland/arm-atomic] ARM: split generic and Linux-specific bits/atomic.h
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: <libc-ports at sourceware dot org>
- Date: Fri, 21 Sep 2012 23:43:07 +0000
- Subject: Re: [PATCH roland/arm-atomic] ARM: split generic and Linux-specific bits/atomic.h
- References: <20120814235134.18B7B2C0EC@topped-with-meat.com>
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