[*] Two trivial Linux tweaks
This commit is contained in:
parent
fae93a71b0
commit
31319981ba
@ -8,7 +8,6 @@
|
|||||||
#include <RuntimeInternal.hpp>
|
#include <RuntimeInternal.hpp>
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <linux/futex.h>
|
#include <linux/futex.h>
|
||||||
#include <sys/random.h>
|
|
||||||
|
|
||||||
namespace Aurora
|
namespace Aurora
|
||||||
{
|
{
|
||||||
|
@ -235,7 +235,7 @@ namespace Aurora::Threading::Primitives
|
|||||||
void SemaphoreImpl::Unlock(AuUInt16 count)
|
void SemaphoreImpl::Unlock(AuUInt16 count)
|
||||||
{
|
{
|
||||||
AuAtomicAdd<AuUInt32>(&this->dwState_, count);
|
AuAtomicAdd<AuUInt32>(&this->dwState_, count);
|
||||||
if (this->dwSleeping_)
|
if (AuAtomicLoad(&this->dwSleeping_))
|
||||||
{
|
{
|
||||||
futex_wake(&this->dwState_, count);
|
futex_wake(&this->dwState_, count);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user