AuroraRuntime/Source/IO/Loop/LSLocalMutex.hpp

38 lines
806 B
C++
Raw Normal View History

2023-10-21 03:31:00 +00:00
/***
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: LSLocalMutex.hpp
Date: 2023-10-21
Author: Reece
***/
#pragma once
#include "LSSemaphore.hpp"
namespace Aurora::IO::Loop
{
struct LSLocalMutex : LSSemaphore, ILSMutex
{
LSLocalMutex();
~LSLocalMutex();
bool TryInit();
bool IsSignaled() override;
2023-12-01 10:33:55 +00:00
bool IsSignaledNoSpinIfUserland() override;
2023-10-21 03:31:00 +00:00
ELoopSource GetType() override;
bool Unlock() override;
virtual bool OnTrigger(AuUInt handle) override;
bool TryTakeNoSpin();
bool TryTakeSpin();
bool TryTake();
bool TryTakeWaitNS(AuUInt64 timeout);
PROXY_LOCAL_LOOPSOURCE_EXT_APIS_;
2023-10-21 03:31:00 +00:00
AuAUInt32 uAtomicWord {};
};
}