[*] Two trivial Linux tweaks

This commit is contained in:
Reece Wilson 2023-08-23 23:45:26 +01:00
parent fae93a71b0
commit 31319981ba
2 changed files with 1 additions and 2 deletions

View File

@ -8,7 +8,6 @@
#include <RuntimeInternal.hpp>
#include <sys/syscall.h>
#include <linux/futex.h>
#include <sys/random.h>
namespace Aurora
{

View File

@ -235,7 +235,7 @@ namespace Aurora::Threading::Primitives
void SemaphoreImpl::Unlock(AuUInt16 count)
{
AuAtomicAdd<AuUInt32>(&this->dwState_, count);
if (this->dwSleeping_)
if (AuAtomicLoad(&this->dwSleeping_))
{
futex_wake(&this->dwState_, count);
}