Break out of loop earlier if it is not timeout.
This commit is contained in:
parent
539905192f
commit
3e380f0d3d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139899
@ -651,7 +651,7 @@ do_wait(struct thread *td, struct umtx *umtx, long id, struct timespec *abstime)
|
||||
error = umtxq_sleep(td, &uq.uq_key,
|
||||
td->td_priority | PCATCH,
|
||||
"ucond", timo);
|
||||
if (!(td->td_flags & TDF_UMTXQ))
|
||||
if (error != ETIMEDOUT || !(td->td_flags & TDF_UMTXQ))
|
||||
break;
|
||||
umtxq_unlock(&uq.uq_key);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user