mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-14 01:08:57 -05:00
Common: Polish Fiber class, add comments, asserts and more tests.
This commit is contained in:
@ -43,4 +43,11 @@ void SpinLock::unlock() {
|
||||
lck.clear(std::memory_order_release);
|
||||
}
|
||||
|
||||
bool SpinLock::try_lock() {
|
||||
if (lck.test_and_set(std::memory_order_acquire)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user