summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMasao Uebayashi <uebayasi@cvs.openbsd.org>2013-12-05 01:28:46 +0000
committerMasao Uebayashi <uebayasi@cvs.openbsd.org>2013-12-05 01:28:46 +0000
commita4743057deb363d8d599826bc83fea9d691a406e (patch)
tree14e4e9747855d1cec1dae7867cb87355b5cc6e93 /sys/arch/amd64
parent126d857b1c9bbed67bb0ba78d922048740d74e6c (diff)
Correct spin timeout detection in __mp_lock debug code.
OK pirofti@ krw@ miod@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/lock_machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/lock_machdep.c b/sys/arch/amd64/amd64/lock_machdep.c
index 514fb6faf13..641b973a83f 100644
--- a/sys/arch/amd64/amd64/lock_machdep.c
+++ b/sys/arch/amd64/amd64/lock_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock_machdep.c,v 1.3 2008/12/04 15:48:19 weingart Exp $ */
+/* $OpenBSD: lock_machdep.c,v 1.4 2013/12/05 01:28:45 uebayasi Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
@@ -52,7 +52,7 @@ __mp_lock_spin(struct __mp_lock *mpl)
#else
int ticks = __mp_lock_spinout;
- while (mpl->mpl_count != 0 && ticks-- > 0)
+ while (mpl->mpl_count != 0 && --ticks > 0)
SPINLOCK_SPIN_HOOK;
if (ticks == 0) {