1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-22 23:47:39 +01:00

Work around ECC v7.0 bug by manually definining __sync_val_compare_and_swap()

if it isn't defined yet.

(Logical change 1.68)
This commit is contained in:
mostang.com!davidm 2003-03-27 04:29:07 +00:00
parent a55f2acb86
commit 28fe6a6e8b

View file

@ -93,6 +93,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifdef HAVE_IA64INTRIN_H
# define HAVE_CMPXCHG
# 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) \
((void *) __sync_val_compare_and_swap((long *) (_ptr), \
(long) (_o), (long) (_n)))