Bug fix for obscenely large wait times on uncontested locks
if waittime was zero (the lock was uncontested) l->lpo_waittime in the hash table would not get initialized. Inspection prompted by questions from: Attilio Rao
This commit is contained in:
parent
7ee00338c5
commit
aa077979f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164889
@ -260,10 +260,10 @@ st char *file, int line)
|
||||
l->lpo_filename = file;
|
||||
l->lpo_lineno = line;
|
||||
l->lpo_acqtime = nanoseconds();
|
||||
if (waittime) {
|
||||
if (l->lpo_acqtime > waittime)
|
||||
l->lpo_waittime = l->lpo_acqtime - waittime;
|
||||
}
|
||||
if (waittime && (l->lpo_acqtime > waittime))
|
||||
l->lpo_waittime = l->lpo_acqtime - waittime;
|
||||
else
|
||||
l->lpo_waittime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user