From 0ceb358d5c8c4f92a5784880a62430591bd82a14 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 21 May 2002 21:27:05 +0000 Subject: 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. --- sys/kern/kern_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/kern_mutex.c') 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) -- cgit v1.1