[APU] Move XmaContext::Block() to base class with RAII locking

This commit is contained in:
Herman S.
2026-02-10 00:12:27 +09:00
parent b0a387c6ea
commit 0efd3a9610
9 changed files with 10 additions and 49 deletions

View File

@@ -122,17 +122,6 @@ void XmaContextMaster::Enable() {
set_is_enabled(true);
}
bool XmaContextMaster::Block(bool poll) {
if (!lock_.try_lock()) {
if (poll) {
return false;
}
lock_.lock();
}
lock_.unlock();
return true;
}
void XmaContextMaster::Clear() {
std::lock_guard<xe_mutex> lock(lock_);
XELOGAPU("XmaContext: reset context {}", id());