Skip to content

Commit

Permalink
Added enable()function to the wait_ip_interrupt(timeout) (#8627)
Browse files Browse the repository at this point in the history
Signed-off-by: Manoj Takasi <[email protected]>
Co-authored-by: Manoj Takasi <[email protected]>
  • Loading branch information
ManojTakasi and Manoj Takasi authored Nov 27, 2024
1 parent dc1eea8 commit c5fe317
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/runtime_src/core/common/api/xrt_ip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,13 @@ class ip::interrupt_impl
}

[[nodiscard]] std::cv_status
wait(const std::chrono::milliseconds& timeout) const
wait(const std::chrono::milliseconds& timeout)
{
// Waits for interrupt, or return on timeout
return device->wait_ip_interrupt(handle, static_cast<int32_t>(timeout.count()));
auto status = device->wait_ip_interrupt(handle, static_cast<int32_t>(timeout.count()));
if (status == std::cv_status::no_timeout)
enable(); //re-enable interrupts
return status;
}
};

Expand Down

0 comments on commit c5fe317

Please sign in to comment.