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

38 lines
942 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: WaitSingle.Generic.hpp
Date: 2021-10-2
Author: Reece
***/
#pragma once
#include "ILoopSourceEx.hpp"
namespace Aurora::Loop
{
#if defined(AURORA_IS_POSIX_DERIVED)
#define _OPT_WRITE , AuUInt write
#define _OPT_WRITE_REF , AuUInt &write
#else
#define _OPT_WRITE
#define _OPT_WRITE_REF
#endif
#if defined(AURORA_IS_POSIX_DERIVED)
#define _OPT_WRITE_ARRAY , const AuList<AuUInt> &handlesWrite
#else
#define _OPT_WRITE_ARRAY
#endif
struct WaitSingleBase : public ILoopSourceEx
{
virtual bool IsSignaled() override;
virtual bool WaitOn(AuUInt32 timeout) override;
virtual bool WaitForAtleastOne(AuUInt32 timeout, const AuList<AuUInt> &handles _OPT_WRITE_ARRAY, AuUInt &one _OPT_WRITE_REF) = 0;
virtual bool WaitForOne(AuUInt32 timeout, AuUInt handle _OPT_WRITE) = 0;
};
}