AuroraRuntime/Source/Loop/LSEvent.Linux.hpp
2022-04-12 22:29:50 +01:00

32 lines
771 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: LSEvent.Linux.hpp
Date: 2022-4-4
Author: Reece
***/
#pragma once
#include "LSHandle.hpp"
namespace Aurora::Loop
{
struct LSEvent : public ILSEvent, public LSHandle
{
LSEvent(bool triggered, bool atomicRelease, bool permitMultipleTriggers);
~LSEvent();
bool Set() override;
bool Reset() override;
virtual bool OnTrigger(AuUInt handle) override;
virtual bool IsSignaled() override;
virtual bool WaitOn(AuUInt32 timeout) override;
virtual ELoopSource GetType() override;
private:
void Init(bool init);
bool IsSignaledNonblocking();
bool atomicRelease_;
};
}