diff options
author | David Leonard <d@cvs.openbsd.org> | 1999-03-10 09:30:54 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1999-03-10 09:30:54 +0000 |
commit | 2fe5a47d63dd6275dd1a7f8ea54adcd87c83e5ed (patch) | |
tree | 986f0519ab9b2ea4c65fdc7925372057c6cbedb7 /lib/libc_r | |
parent | 65d96f11b240382a9a3438788ac574063ea13f03 (diff) |
correct asm constraints, espie@
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/arch/sparc/_atomic_lock.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc_r/arch/sparc/_atomic_lock.c b/lib/libc_r/arch/sparc/_atomic_lock.c index c46a0ce6da8..d0974017de4 100644 --- a/lib/libc_r/arch/sparc/_atomic_lock.c +++ b/lib/libc_r/arch/sparc/_atomic_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: _atomic_lock.c,v 1.5 1999/02/07 23:51:00 d Exp $ */ +/* $OpenBSD: _atomic_lock.c,v 1.6 1999/03/10 09:30:53 d Exp $ */ /* * Atomic lock for sparc */ @@ -30,8 +30,12 @@ _atomic_lock(volatile _spinlock_lock_t * lock) * two contending processes in a wait-free fashion." * - p129, The SPARC Architecture Manual (version 9) Prentice-Hall * (See also section J.6 (spinlocks)) + * + * (No change to the condition codes are documented.) */ - __asm__("ldstub %1,%0" : "=r" (old), "+m" (*lock)); + __asm__("ldstub %0,%1" + : "=m" (*lock), "=r" (old) + : "0" (*lock)); return (old == _SPINLOCK_LOCKED); } |