aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/sparc/sparc64/pt-machine.h')
-rw-r--r--linuxthreads/sysdeps/sparc/sparc64/pt-machine.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
index 101b85516a..5560003fc8 100644
--- a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
@@ -63,11 +63,11 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
{
long int readval;
- __asm__ __volatile__ ("cas [%4], %2, %0"
+ __asm__ __volatile__ ("casx [%4], %2, %0"
: "=r"(readval), "=m"(*p)
: "r"(oldval), "m"(*p), "r"(p), "0"(newval));
- return readval == newval;
+ return readval == oldval;
}
/* Access to data in the thread descriptor is easy. */