summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-01-12 21:07:13 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-01-12 21:07:13 +0000
commit20be7b702fa19dd2a91c249516182353ed26b97e (patch)
tree2d4d901bf4f954853f28c20ff41d6ff16a367999 /sys/arch
parent24c2b7a58e9c4ece7fd90ba6c6d1b97475558f1b (diff)
Make __cpu_simple_lock implementation actually work.
ok deraadt@, jsing@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/include/lock.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/hppa/include/lock.h b/sys/arch/hppa/include/lock.h
index 5120425631a..48430c7163f 100644
--- a/sys/arch/hppa/include/lock.h
+++ b/sys/arch/hppa/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.2 2010/07/01 03:38:50 jsing Exp $ */
+/* $OpenBSD: lock.h,v 1.3 2011/01/12 21:07:12 kettenis Exp $ */
/* public domain */
@@ -26,7 +26,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *l)
do {
old = __SIMPLELOCK_LOCKED;
__asm__ __volatile__
- ("ldcw %1, %0" : "=r" (old), "=m" (l) : "m" (l));
+ ("ldcws 0(%2), %0" : "=&r" (old), "+m" (l) : "r" (l));
} while (old != __SIMPLELOCK_UNLOCKED);
}
@@ -36,7 +36,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *l)
__cpu_simple_lock_t old = __SIMPLELOCK_LOCKED;
__asm__ __volatile__
- ("ldcw %1, %0" : "=r" (old), "=m" (l) : "m" (l));
+ ("ldcws 0(%2), %0" : "=&r" (old), "+m" (l) : "r" (l));
return (old == __SIMPLELOCK_UNLOCKED);
}