diff --git a/orbis-kernel/src/umtx.cpp b/orbis-kernel/src/umtx.cpp index 18d09bd1c..7015729a8 100644 --- a/orbis-kernel/src/umtx.cpp +++ b/orbis-kernel/src/umtx.cpp @@ -467,10 +467,8 @@ orbis::ErrorCode orbis::umtx_sem_wake(Thread *thread, ptr 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 {}; }