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.
This commit is contained in:
John Baldwin 2002-05-21 21:27:05 +00:00
parent 1515cd22e1
commit 0e54ddadd9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97084
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)