From c0a68bfa57908ee51e391f1a5676915b503bfb07 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 22 Oct 2009 15:50:05 -0400 Subject: [PATCH] Sparc64: complete and test implementation Signed-off-by: Mathieu Desnoyers --- README | 6 +++--- configure.ac | 2 +- urcu/uatomic_arch_sparc64.h | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README b/README index b96912e..7cc8871 100644 --- a/README +++ b/README @@ -21,9 +21,9 @@ BUILDING ARCHITECTURES SUPPORTED ----------------------- -Currently, x86 (i386, i486, i586, i686), x86 64-bit, PowerPC 32/64, S390 and -S390x are supported. Only tested on Linux so far, but should theoretically work -on other operating systems. +Currently, x86 (i386, i486, i586, i686), x86 64-bit, PowerPC 32/64, S390, S390x +and Sparc64 are supported. Only tested on Linux so far, but should +theoretically work on other operating systems. QUICK START GUIDE ----------------- diff --git a/configure.ac b/configure.ac index a8de71d..4ece75d 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,7 @@ case $target_cpu in ppc) ARCHTYPE="ppc" ;; s390) ARCHTYPE="s390" ;; s390x) ARCHTYPE="s390" ;; - sparc) ARCHTYPE="sparc" ;; + sparc64) ARCHTYPE="sparc64" ;; *) ARCHTYPE="unknown";; esac diff --git a/urcu/uatomic_arch_sparc64.h b/urcu/uatomic_arch_sparc64.h index 87deacd..35b9ac2 100644 --- a/urcu/uatomic_arch_sparc64.h +++ b/urcu/uatomic_arch_sparc64.h @@ -90,9 +90,9 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len) switch (len) { case 4: { - unsigned int old; + unsigned int old, oldt; - oldt = uatomic_read(addr); + oldt = uatomic_read((unsigned int *)addr); do { old = oldt; oldt = _uatomic_cmpxchg(addr, old, val, 4); @@ -103,9 +103,9 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len) #if (BITS_PER_LONG == 64) case 8: { - unsigned long old; + unsigned long old, oldt; - oldt = uatomic_read(addr); + oldt = uatomic_read((unsigned long *)addr); do { old = oldt; oldt = _uatomic_cmpxchg(addr, old, val, 8); @@ -132,9 +132,9 @@ unsigned long _uatomic_add_return(void *addr, unsigned long val, switch (len) { case 4: { - unsigned int old; + unsigned int old, oldt; - oldt = uatomic_read(addr); + oldt = uatomic_read((unsigned int *)addr); do { old = oldt; oldt = _uatomic_cmpxchg(addr, old, old + val, 4); @@ -145,9 +145,9 @@ unsigned long _uatomic_add_return(void *addr, unsigned long val, #if (BITS_PER_LONG == 64) case 8: { - unsigned long old; + unsigned long old, oldt; - oldt = uatomic_read(addr); + oldt = uatomic_read((unsigned long *)addr); do { old = oldt; oldt = _uatomic_cmpxchg(addr, old, old + val, 8); -- 2.34.1