From: Mathieu Desnoyers Date: Thu, 22 Oct 2009 19:50:05 +0000 (-0400) Subject: Sparc64: complete and test implementation X-Git-Tag: v0.3.0~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c0a68bfa57908ee51e391f1a5676915b503bfb07;p=urcu.git Sparc64: complete and test implementation Signed-off-by: Mathieu Desnoyers --- 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);