1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-26 09:07:38 +01:00

Switch from __sync_val_compare_and_swap() to

__sync_bool_compare_and_swap() since that's we need nowadays anyhow
and since that's also provided by ecc v7.0.

(Logical change 1.138)
This commit is contained in:
mostang.com!davidm 2003-12-05 06:42:28 +00:00
parent 046362a970
commit bcdedf6b28

View file

@ -132,19 +132,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#else #else
# ifdef HAVE_IA64INTRIN_H # ifdef HAVE_IA64INTRIN_H
# include <ia64intrin.h> # include <ia64intrin.h>
/*
* ecc v7.0 is broken: it's missing __sync_val_compare_and_swap()
* even though the ia64 ABI requires it. Work around it:
*/
# ifndef __sync_val_compare_and_swap
# define __sync_val_compare_and_swap(x,y,z) \
_InterlockedCompareExchange64_rel(x,y,z)
# endif
# define cmpxchg_ptr(_ptr,_o,_n) \ # define cmpxchg_ptr(_ptr,_o,_n) \
((void *) __sync_val_compare_and_swap((volatile long *) (_ptr), \ (__sync_bool_compare_and_swap((volatile long *) (_ptr), \
(long) (_o), (long) (_n)) \ (long) (_o), (long) (_n)))
== (_o))
# define fetch_and_add1(_ptr) __sync_fetch_and_add(_ptr, 1) # define fetch_and_add1(_ptr) __sync_fetch_and_add(_ptr, 1)
# define HAVE_CMPXCHG # define HAVE_CMPXCHG
# define HAVE_FETCH_AND_ADD1 # define HAVE_FETCH_AND_ADD1