mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-31 13:50:46 +01:00
[orbis-kernel] Fix umtx_sem_wake
This commit is contained in:
parent
e5aa5a96e8
commit
6c7bde4faa
|
|
@ -467,10 +467,8 @@ orbis::ErrorCode orbis::umtx_sem_wake(Thread *thread, ptr<usem> sem) {
|
|||
ORBIS_LOG_WARNING(__FUNCTION__, sem);
|
||||
auto [chain, key, lock] = g_context.getUmtxChain0(thread->tproc->pid, sem);
|
||||
std::size_t count = chain.sleep_queue.count(key);
|
||||
if (auto up = chain.notify_one(key); up >= count)
|
||||
thread->retval[0] = sem->has_waiters;
|
||||
else
|
||||
thread->retval[0] = 0;
|
||||
if (chain.notify_one(key) >= count)
|
||||
sem->has_waiters.store(0, std::memory_order::relaxed);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue