AuroraRuntime/Source/Loop/LSSemaphore.Linux.hpp

28 lines
605 B
C++
Raw Normal View History

2022-04-05 05:59:23 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: LSSemaphore.Linux.hpp
Date: 2022-4-5
Author: Reece
***/
#pragma once
#include "LSHandle.hpp"
namespace Aurora::Loop
{
2022-04-05 05:59:23 +00:00
struct LSSemaphore : public ILSSemaphore, public LSHandle
{
LSSemaphore(AuUInt32 initialCount);
bool AddOne() override;
virtual bool OnTrigger(AuUInt handle) override;
bool IsSignaled() override;
virtual ELoopSource GetType() override;
private:
void Init(AuUInt32 initialCount);
bool IsSignaledNonblocking();
};
}