mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 09:12:44 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97084
@ -621,7 +621,7 @@ _mtx_lock_spin(struct mtx *m, int opts, const char *file, int line)
|
|||||||
while (m->mtx_lock != MTX_UNOWNED) {
|
while (m->mtx_lock != MTX_UNOWNED) {
|
||||||
if (i++ < 10000000)
|
if (i++ < 10000000)
|
||||||
continue;
|
continue;
|
||||||
if (i++ < 60000000)
|
if (i < 60000000)
|
||||||
DELAY(1);
|
DELAY(1);
|
||||||
#ifdef DDB
|
#ifdef DDB
|
||||||
else if (!db_active)
|
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) {
|
while (m->mtx_lock != MTX_UNOWNED) {
|
||||||
if (i++ < 10000000)
|
if (i++ < 10000000)
|
||||||
continue;
|
continue;
|
||||||
if (i++ < 60000000)
|
if (i < 60000000)
|
||||||
DELAY(1);
|
DELAY(1);
|
||||||
#ifdef DDB
|
#ifdef DDB
|
||||||
else if (!db_active)
|
else if (!db_active)
|
||||||
|
Loading…
Reference in New Issue
Block a user