[Kernel] WaitForNotification skip wait w/o wait_ticks

This commit is contained in:
Gliniak 2020-12-26 11:55:03 +01:00 committed by Rick Gibbed
parent ea6969f378
commit 74cb0117cf
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ bool XIOCompletion::WaitForNotification(uint64_t wait_ticks,
IONotification* notify) {
auto ms = std::chrono::milliseconds(TimeoutTicksToMs(wait_ticks));
auto res = threading::Wait(notification_semaphore_.get(), false, ms);
if (res == threading::WaitResult::kSuccess) {
if (res == threading::WaitResult::kSuccess || !wait_ticks) {
std::unique_lock<std::mutex> lock(notification_lock_);
assert_false(notifications_.empty());