2021-10-03 12:47:16 +00:00
|
|
|
/***
|
|
|
|
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"
|
|
|
|
|
2022-06-11 23:52:46 +00:00
|
|
|
namespace Aurora::IO::Loop
|
2021-10-03 12:47:16 +00:00
|
|
|
{
|
2022-04-05 01:19:37 +00:00
|
|
|
|
|
|
|
#if defined(AURORA_IS_POSIX_DERIVED)
|
2022-04-05 10:11:19 +00:00
|
|
|
#define _OPT_WRITE , AuUInt write
|
|
|
|
#define _OPT_WRITE_REF , AuUInt &write
|
2022-04-05 01:19:37 +00:00
|
|
|
#else
|
|
|
|
#define _OPT_WRITE
|
2022-04-05 10:11:19 +00:00
|
|
|
#define _OPT_WRITE_REF
|
2022-04-05 01:19:37 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(AURORA_IS_POSIX_DERIVED)
|
|
|
|
#define _OPT_WRITE_ARRAY , const AuList<AuUInt> &handlesWrite
|
|
|
|
#else
|
|
|
|
#define _OPT_WRITE_ARRAY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2022-05-04 15:34:02 +00:00
|
|
|
struct WaitSingleBase : virtual ILoopSourceEx
|
2021-10-03 12:47:16 +00:00
|
|
|
{
|
2024-09-07 21:45:34 +00:00
|
|
|
virtual bool IsSignaledExt(AuUInt8 uFlags) override;
|
2023-12-01 10:33:55 +00:00
|
|
|
virtual bool IsSignaledNoSpinIfUserland() override;
|
2022-04-12 21:26:15 +00:00
|
|
|
virtual bool IsSignaled() override;
|
2024-09-07 21:45:34 +00:00
|
|
|
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;
|
2021-10-03 12:47:16 +00:00
|
|
|
};
|
|
|
|
}
|