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:
parent
1515cd22e1
commit
0e54ddadd9
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user