summaryrefslogtreecommitdiff
path: root/sys/arch
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
parent126d857b1c9bbed67bb0ba78d922048740d74e6c (diff)
Correct spin timeout detection in __mp_lock debug code.
OK pirofti@ krw@ miod@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/lock_machdep.c4
-rw-r--r--sys/arch/hppa/hppa/lock_machdep.c4
-rw-r--r--sys/arch/i386/i386/lock_machdep.c4
-rw-r--r--sys/arch/macppc/macppc/lock_machdep.c4
-rw-r--r--sys/arch/octeon/octeon/lock_machdep.c4
-rw-r--r--sys/arch/sgi/sgi/lock_machdep.c4
-rw-r--r--sys/arch/sparc64/sparc64/lock_machdep.c4
7 files changed, 14 insertions, 14 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) {
diff --git a/sys/arch/hppa/hppa/lock_machdep.c b/sys/arch/hppa/hppa/lock_machdep.c
index 5feebe9616e..c12e220ffb6 100644
--- a/sys/arch/hppa/hppa/lock_machdep.c
+++ b/sys/arch/hppa/hppa/lock_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock_machdep.c,v 1.3 2011/01/12 21:11:12 kettenis Exp $ */
+/* $OpenBSD: lock_machdep.c,v 1.4 2013/12/05 01:28:45 uebayasi Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
@@ -85,7 +85,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) {
diff --git a/sys/arch/i386/i386/lock_machdep.c b/sys/arch/i386/i386/lock_machdep.c
index 6335461cc64..71b1810a311 100644
--- a/sys/arch/i386/i386/lock_machdep.c
+++ b/sys/arch/i386/i386/lock_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock_machdep.c,v 1.12 2013/05/21 20:05:30 tedu Exp $ */
+/* $OpenBSD: lock_machdep.c,v 1.13 2013/12/05 01:28:45 uebayasi Exp $ */
/* $NetBSD: lock_machdep.c,v 1.1.2.3 2000/05/03 14:40:30 sommerfeld Exp $ */
/*-
@@ -81,7 +81,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) {
diff --git a/sys/arch/macppc/macppc/lock_machdep.c b/sys/arch/macppc/macppc/lock_machdep.c
index e8697fdb31b..2451f0bfe32 100644
--- a/sys/arch/macppc/macppc/lock_machdep.c
+++ b/sys/arch/macppc/macppc/lock_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock_machdep.c,v 1.1 2009/09/07 19:29:33 miod Exp $ */
+/* $OpenBSD: lock_machdep.c,v 1.2 2013/12/05 01:28:45 uebayasi Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
@@ -54,7 +54,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) {
diff --git a/sys/arch/octeon/octeon/lock_machdep.c b/sys/arch/octeon/octeon/lock_machdep.c
index cab05e20856..c3f6f512b72 100644
--- a/sys/arch/octeon/octeon/lock_machdep.c
+++ b/sys/arch/octeon/octeon/lock_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock_machdep.c,v 1.3 2012/09/29 19:24:31 miod Exp $ */
+/* $OpenBSD: lock_machdep.c,v 1.4 2013/12/05 01:28:45 uebayasi Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
@@ -54,7 +54,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) {
diff --git a/sys/arch/sgi/sgi/lock_machdep.c b/sys/arch/sgi/sgi/lock_machdep.c
index 75e7d393cf5..3faee86b754 100644
--- a/sys/arch/sgi/sgi/lock_machdep.c
+++ b/sys/arch/sgi/sgi/lock_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock_machdep.c,v 1.4 2012/09/29 19:24:31 miod Exp $ */
+/* $OpenBSD: lock_machdep.c,v 1.5 2013/12/05 01:28:45 uebayasi Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
@@ -54,7 +54,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) {
diff --git a/sys/arch/sparc64/sparc64/lock_machdep.c b/sys/arch/sparc64/sparc64/lock_machdep.c
index 357873d2f39..7361a11b89e 100644
--- a/sys/arch/sparc64/sparc64/lock_machdep.c
+++ b/sys/arch/sparc64/sparc64/lock_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock_machdep.c,v 1.3 2012/10/29 21:58:07 kettenis Exp $ */
+/* $OpenBSD: lock_machdep.c,v 1.4 2013/12/05 01:28:45 uebayasi Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
@@ -85,7 +85,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) {