[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

@@ -208,17 +208,6 @@ bool XmaContextNew::Work() {
void XmaContextNew::Enable() { set_is_enabled(true); }
bool XmaContextNew::Block(bool poll) {
if (!lock_.try_lock()) {
if (poll) {
return false;
}
lock_.lock();
}
lock_.unlock();
return true;
}
void XmaContextNew::Clear() {
std::lock_guard<xe_mutex> lock(lock_);