summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mutex.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-05-21 21:27:05 +0000
committerjhb <jhb@FreeBSD.org>2002-05-21 21:27:05 +0000
commit0ceb358d5c8c4f92a5784880a62430591bd82a14 (patch)
treee025d5d072375d5852c8e93a01fbf7e144b44557 /sys/kern/kern_mutex.c
parent8bb819d225a5be957b9b12d9ac5570f40ffb3c1a (diff)
downloadFreeBSD-src-0ceb358d5c8c4f92a5784880a62430591bd82a14.zip
FreeBSD-src-0ceb358d5c8c4f92a5784880a62430591bd82a14.tar.gz
Fix an old cut 'n' paste bug inherited from BSD/OS: don't increment 'i'
twice once we are in the long wait stage of spinning on a spin mutex.
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r--sys/kern/kern_mutex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 2430804..153b505 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -621,7 +621,7 @@ _mtx_lock_spin(struct mtx *m, int opts, const char *file, int line)
while (m->mtx_lock != MTX_UNOWNED) {
if (i++ < 10000000)
continue;
- if (i++ < 60000000)
+ if (i < 60000000)
DELAY(1);
#ifdef DDB
else if (!db_active)
OpenPOWER on IntegriCloud