mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-20 15:40:30 +01:00
orbis: fixed race on signal handling
This commit is contained in:
parent
f7651d7eae
commit
79d3f279fd
|
|
@ -382,7 +382,9 @@ void Thread::setSigMask(SigSet newSigMask) {
|
|||
void Thread::where() { tproc->ops->where(this); }
|
||||
|
||||
bool Thread::unblock() {
|
||||
if (interruptedMtx.load(std::memory_order::relaxed) != 0) {
|
||||
std::uint32_t prev = interruptedMtx.exchange(0, std::memory_order::relaxed);
|
||||
if (prev != 0) {
|
||||
interruptedMtx.notify_one();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue