AuroraRuntime/Source/IO/Loop/WaitSingleBase.hpp
J Reece Wilson 02826d2365 [+] AuLoop::kWaitMultipleFlagNoIOCallbacks
[+] AuLoop::kWaitMultipleFlagBreakAfterAPC
[+] Alternative Wait AND implementations for NT, POSIX, and generic
[+] IOConfig::...
[*] LoopQueue improvements
[+] ILoopQueue::ConfigureDoIOApcCallbacks
[+] ILoopQueue::ConfigureDoIOApcCallbacks
2024-10-10 11:03:26 +01:00

44 lines
1.3 KiB
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::IO::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 : virtual ILoopSourceEx
{
virtual bool IsSignaledExt(AuUInt8 uFlags) override;
virtual bool IsSignaledNoSpinIfUserland() override;
virtual bool IsSignaled() override;
virtual bool WaitOnExt(AuUInt8 uFlags, AuUInt32 timeout) override;
virtual bool WaitOn(AuUInt32 timeout) override;
virtual bool WaitOnAbs(AuUInt64 uTimeoutAbs) override;
virtual bool WaitOnAbsExt(AuUInt8 uFlags, AuUInt64 uTimeoutAbs) override;
virtual bool WaitForAtleastOne(AuUInt32 timeout, const AuList<AuUInt> &handles _OPT_WRITE_ARRAY, AuUInt &one _OPT_WRITE_REF, bool bNoAlert) = 0;
virtual bool WaitForOne(AuUInt32 timeout, AuUInt handle _OPT_WRITE, bool bNoAlert) = 0;
private:
bool IsSignaledExt_(AuUInt8 uFlags);
};
}