[*] Huge refactor - Move Aurora::[IPC and Loop] to Aurora::IO
This commit is contained in:
parent
44108a322e
commit
5d2b642ac0
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct ILoopSource;
|
||||
}
|
||||
|
@ -7,9 +7,10 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct ILoopQueue;
|
||||
struct ILoopSource;
|
||||
}
|
||||
|
||||
namespace Aurora::Async
|
||||
@ -72,7 +73,7 @@ namespace Aurora::Async
|
||||
// Note: syncing to yourself will nullify requireSignal to prevent deadlock conditions
|
||||
virtual bool Sync(WorkerId_t workerId, AuUInt32 timeoutMs = 0, bool requireSignal = false) = 0;
|
||||
virtual void Signal(WorkerId_t workerId) = 0;
|
||||
virtual AuSPtr<Loop::ILoopSource> WorkerToLoopSource(WorkerId_t id) = 0;
|
||||
virtual AuSPtr<IO::Loop::ILoopSource> WorkerToLoopSource(WorkerId_t id) = 0;
|
||||
virtual void SyncAllSafe() = 0;
|
||||
|
||||
// Features
|
||||
@ -83,8 +84,8 @@ namespace Aurora::Async
|
||||
virtual void AssertWorker(WorkerId_t id) = 0;
|
||||
|
||||
// Async subsystem glue
|
||||
virtual AuSPtr<Loop::ILoopQueue> ToKernelWorkQueue() = 0;
|
||||
virtual AuSPtr<Loop::ILoopQueue> ToKernelWorkQueue(WorkerId_t workerId) = 0;
|
||||
virtual AuSPtr<IO::Loop::ILoopQueue> ToKernelWorkQueue() = 0;
|
||||
virtual AuSPtr<IO::Loop::ILoopQueue> ToKernelWorkQueue(WorkerId_t workerId) = 0;
|
||||
virtual void UpdateWorkMode(WorkerId_t workerId, RunMode mode) = 0;
|
||||
virtual ERunMode GetCurrentThreadRunMode() = 0;
|
||||
virtual ERunMode GetThreadRunMode(WorkerId_t workerId) = 0;
|
||||
|
@ -15,7 +15,7 @@ namespace Aurora::Logging
|
||||
struct ILogger;
|
||||
}
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct ILoopSource;
|
||||
}
|
||||
@ -53,7 +53,7 @@ namespace Aurora::Console
|
||||
*/
|
||||
AUKN_SYM bool DispatchRawLine(const AuString &string);
|
||||
|
||||
AUKN_SYM AuSPtr<Loop::ILoopSource> StdInBufferLoopSource();
|
||||
AUKN_SYM AuSPtr<IO::Loop::ILoopSource> StdInBufferLoopSource();
|
||||
|
||||
AUKN_SYM void OpenLateStd();
|
||||
AUKN_SYM void OpenLateGUI();
|
||||
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct ILoopSource;
|
||||
}
|
||||
@ -64,7 +64,7 @@ namespace Aurora::IO
|
||||
* @brief Provides a loop source that becomes signaled once the transaction is complete.
|
||||
* Polling the transaction may result in the execution of the callback.
|
||||
*/
|
||||
virtual AuSPtr<Loop::ILoopSource> NewLoopSource() = 0;
|
||||
virtual AuSPtr<IO::Loop::ILoopSource> NewLoopSource() = 0;
|
||||
|
||||
/**
|
||||
* @brief Resets ::Complete() and NewLoopSource()->IsSignaled() to false
|
||||
|
2
Include/Aurora/IPC/IExportableIPC.hpp → Include/Aurora/IO/IPC/IExportableIPC.hpp
Executable file → Normal file
2
Include/Aurora/IPC/IExportableIPC.hpp → Include/Aurora/IO/IPC/IExportableIPC.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
struct IExportableIPC
|
||||
{
|
2
Include/Aurora/IPC/IPC.hpp → Include/Aurora/IO/IPC/IPC.hpp
Executable file → Normal file
2
Include/Aurora/IPC/IPC.hpp → Include/Aurora/IO/IPC/IPC.hpp
Executable file → Normal file
@ -12,7 +12,7 @@
|
||||
#include "IPCPipe.hpp"
|
||||
#include "IPCSharedMemory.hpp"
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
|
||||
}
|
2
Include/Aurora/IPC/IPCPipe.hpp → Include/Aurora/IO/IPC/IPCPipe.hpp
Executable file → Normal file
2
Include/Aurora/IPC/IPCPipe.hpp → Include/Aurora/IO/IPC/IPCPipe.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
struct IPCPipe : IExportableIPC
|
||||
{
|
2
Include/Aurora/IPC/IPCPrimitives.hpp → Include/Aurora/IO/IPC/IPCPrimitives.hpp
Executable file → Normal file
2
Include/Aurora/IPC/IPCPrimitives.hpp → Include/Aurora/IO/IPC/IPCPrimitives.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
struct IPCEvent : Loop::ILSEvent, IExportableIPC
|
||||
{
|
2
Include/Aurora/IPC/IPCSharedMemory.hpp → Include/Aurora/IO/IPC/IPCSharedMemory.hpp
Executable file → Normal file
2
Include/Aurora/IPC/IPCSharedMemory.hpp → Include/Aurora/IO/IPC/IPCSharedMemory.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
struct IPCSharedMemory : IExportableIPC
|
||||
{
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
enum class ELoopSource
|
||||
{
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
// ILoopQueue's are comparable to a CoreFoundation RunLoop with the input parameters of NT's WaitMultipleObjects and RegisterWaitForSingleObject
|
||||
// This shouldn't be too much heavier than CF's libevent/NT abstraction
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct ILoopSource
|
||||
{
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
AUKN_INTERFACE(ILoopSourceSubscriber,
|
||||
/**
|
@ -17,7 +17,7 @@
|
||||
#include "ILoopSourceSubscriber.hpp"
|
||||
#include "ILoopQueue.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
/// @deprecated
|
||||
AUKN_SYM AuList<AuSPtr<ILoopSource>> WaitMultipleOrObjects(const AuList<AuSPtr<ILoopSource>> &objects, AuUInt32 timeout);
|
@ -29,7 +29,7 @@ namespace Aurora::Processes
|
||||
* @brief Kernel synchronization primitive to synchronize against the process
|
||||
*
|
||||
*/
|
||||
virtual AuSPtr<Loop::ILoopSource> AsLoopSource() = 0;
|
||||
virtual AuSPtr<IO::Loop::ILoopSource> AsLoopSource() = 0;
|
||||
|
||||
/**
|
||||
* @brief returns the exit code of the process should we outlive them
|
||||
|
@ -62,8 +62,8 @@
|
||||
#include "Threading/Threading.hpp"
|
||||
#include "Async/Async.hpp"
|
||||
#include "Processes/Processes.hpp"
|
||||
#include "Loop/Loop.hpp"
|
||||
#include "IPC/IPC.hpp"
|
||||
#include "IO/Loop/Loop.hpp"
|
||||
#include "IO/IPC/IPC.hpp"
|
||||
#include "SWInfo/SWInfo.hpp"
|
||||
#include "Exit/Exit.hpp"
|
||||
#include "CmdLine/CmdLine.hpp"
|
||||
@ -83,9 +83,19 @@ namespace AuThreadPrimitives = Aurora::Threading::Primitives;
|
||||
namespace AuThreads = Aurora::Threading::Threads;
|
||||
namespace AuHwInfo = Aurora::HWInfo;
|
||||
namespace AuSwInfo = Aurora::SWInfo;
|
||||
|
||||
namespace AuIO = Aurora::IO;
|
||||
namespace AuIOFS = Aurora::IO::FS;
|
||||
namespace AuIONet = Aurora::IO::Net;
|
||||
namespace AuIOIPC = Aurora::IO::IPC;
|
||||
namespace AuIOLoop = Aurora::IO::Loop;
|
||||
|
||||
// Legacy shorthands; wont deprecate
|
||||
namespace AuIPC = Aurora::IO::IPC;
|
||||
namespace AuLoop = Aurora::IO::Loop;
|
||||
namespace AuNet = Aurora::IO::Net;
|
||||
namespace AuFS = Aurora::IO::FS;
|
||||
|
||||
namespace AuRng = Aurora::RNG;
|
||||
namespace AuLocale = Aurora::Locale;
|
||||
namespace AuParse = Aurora::Parse;
|
||||
@ -96,7 +106,6 @@ namespace AuTime = Aurora::Time;
|
||||
namespace AuTypes = Aurora::Types;
|
||||
namespace AuLog = Aurora::Logging;
|
||||
namespace AuMemory = Aurora::Memory;
|
||||
namespace AuLoop = Aurora::Loop;
|
||||
namespace AuExit = Aurora::Exit;
|
||||
|
||||
using AuWorkerId_t = AuAsync::WorkerId_t;
|
||||
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct ILoopSource;
|
||||
}
|
||||
@ -64,10 +64,10 @@ namespace Aurora::Threading::Threads
|
||||
virtual AuSPtr<TLSView> GetTlsView() = 0;
|
||||
|
||||
virtual AuSPtr<IWaitable> AsWaitable() = 0;
|
||||
virtual AuSPtr<Loop::ILoopSource> AsLoopSource() = 0;
|
||||
virtual AuSPtr<IO::Loop::ILoopSource> AsLoopSource() = 0;
|
||||
|
||||
virtual AuSPtr<IWaitable> GetShutdownSignalWaitable() = 0;
|
||||
virtual AuSPtr<Loop::ILoopSource> GetShutdownSignalLS() = 0;
|
||||
virtual AuSPtr<IO::Loop::ILoopSource> GetShutdownSignalLS() = 0;
|
||||
|
||||
// TODO: consider detach support.
|
||||
// The problem is, if the aurora runtime transfers ownership of an IAuroraThread to you, you have to leak it
|
||||
|
@ -150,7 +150,7 @@ namespace Aurora::Async
|
||||
return ThreadPool::Sync(workerId, timeoutMs, requireSignal);
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopSource> AsyncApp::WorkerToLoopSource(WorkerId_t id)
|
||||
AuSPtr<AuLoop::ILoopSource> AsyncApp::WorkerToLoopSource(WorkerId_t id)
|
||||
{
|
||||
return ThreadPool::WorkerToLoopSource(id);
|
||||
}
|
||||
@ -180,12 +180,12 @@ namespace Aurora::Async
|
||||
ThreadPool::AssertWorker(id);
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopQueue> AsyncApp::ToKernelWorkQueue()
|
||||
AuSPtr<AuLoop::ILoopQueue> AsyncApp::ToKernelWorkQueue()
|
||||
{
|
||||
return ThreadPool::ToKernelWorkQueue();
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopQueue> AsyncApp::ToKernelWorkQueue(WorkerId_t workerId)
|
||||
AuSPtr<AuLoop::ILoopQueue> AsyncApp::ToKernelWorkQueue(WorkerId_t workerId)
|
||||
{
|
||||
return ThreadPool::ToKernelWorkQueue(workerId);
|
||||
}
|
||||
|
@ -33,15 +33,15 @@ namespace Aurora::Async
|
||||
AuBST<ThreadGroup_t, AuList<ThreadId_t>> GetThreads() override;
|
||||
WorkerId_t GetCurrentThread() override;
|
||||
bool Sync(WorkerId_t workerId, AuUInt32 timeoutMs = 0, bool requireSignal = false) override;
|
||||
AuSPtr<Loop::ILoopSource> WorkerToLoopSource(WorkerId_t id) override;
|
||||
AuSPtr<AuLoop::ILoopSource> WorkerToLoopSource(WorkerId_t id) override;
|
||||
void Signal(WorkerId_t workerId) override;
|
||||
void SyncAllSafe() override;
|
||||
void AddFeature(WorkerId_t id, AuSPtr<Threading::Threads::IThreadFeature> feature, bool async) override;
|
||||
void AssertInThreadGroup(ThreadGroup_t group) override;
|
||||
void AssertWorker(WorkerId_t id) override;
|
||||
|
||||
AuSPtr<Loop::ILoopQueue> ToKernelWorkQueue() override;
|
||||
AuSPtr<Loop::ILoopQueue> ToKernelWorkQueue(WorkerId_t workerId) override;
|
||||
AuSPtr<AuLoop::ILoopQueue> ToKernelWorkQueue() override;
|
||||
AuSPtr<AuLoop::ILoopQueue> ToKernelWorkQueue(WorkerId_t workerId) override;
|
||||
void UpdateWorkMode(WorkerId_t workerId, RunMode mode) override;
|
||||
ERunMode GetCurrentThreadRunMode() override;
|
||||
ERunMode GetThreadRunMode(WorkerId_t workerId) override;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "Async.hpp"
|
||||
#include "GroupState.hpp"
|
||||
#include <Source/Loop/LSAsync.hpp>
|
||||
#include <Source/IO/Loop/LSAsync.hpp>
|
||||
|
||||
namespace Aurora::Async
|
||||
{
|
||||
@ -26,7 +26,7 @@ namespace Aurora::Async
|
||||
return false;
|
||||
}
|
||||
|
||||
this->eventLs = Loop::NewLSAsync();
|
||||
this->eventLs = AuLoop::NewLSAsync();
|
||||
if (!this->eventLs)
|
||||
{
|
||||
return false;
|
||||
|
@ -16,8 +16,8 @@ namespace Aurora::Async
|
||||
|
||||
AuThreadPrimitives::ConditionMutexUnique_t cvWorkMutex;
|
||||
AuThreadPrimitives::ConditionVariableUnique_t cvVariable;
|
||||
AuSPtr<Loop::ILSEvent> eventLs;
|
||||
AuSPtr<Loop::ILoopSource> asyncLoopSourceShared;
|
||||
AuSPtr<AuLoop::ILSEvent> eventLs;
|
||||
AuSPtr<AuLoop::ILoopSource> asyncLoopSourceShared;
|
||||
|
||||
AuList<WorkEntry_t> workQueue;
|
||||
bool sorted {};
|
||||
|
@ -754,7 +754,7 @@ namespace Aurora::Async
|
||||
}
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopSource> ThreadPool::WorkerToLoopSource(WorkerId_t workerId)
|
||||
AuSPtr<AuLoop::ILoopSource> ThreadPool::WorkerToLoopSource(WorkerId_t workerId)
|
||||
{
|
||||
AU_LOCK_GUARD(this->rwlock_->AsReadable());
|
||||
|
||||
@ -808,12 +808,12 @@ namespace Aurora::Async
|
||||
SysAssert(static_cast<WorkerId_t>(tlsWorkerId) == id);
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopQueue> ThreadPool::ToKernelWorkQueue()
|
||||
AuSPtr<AuLoop::ILoopQueue> ThreadPool::ToKernelWorkQueue()
|
||||
{
|
||||
return this->GetThreadState()->asyncLoop;
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopQueue> ThreadPool::ToKernelWorkQueue(WorkerId_t workerId)
|
||||
AuSPtr<AuLoop::ILoopQueue> ThreadPool::ToKernelWorkQueue(WorkerId_t workerId)
|
||||
{
|
||||
auto worker = this->GetThreadHandle(workerId);
|
||||
if (!worker)
|
||||
|
@ -61,7 +61,7 @@ namespace Aurora::Async
|
||||
|
||||
virtual bool Sync(WorkerId_t workerId, AuUInt32 timeoutMs, bool requireSignal) override;
|
||||
virtual void Signal(WorkerId_t workerId) override;
|
||||
virtual AuSPtr<Loop::ILoopSource> WorkerToLoopSource(WorkerId_t id) override;
|
||||
virtual AuSPtr<AuLoop::ILoopSource> WorkerToLoopSource(WorkerId_t id) override;
|
||||
virtual void SyncAllSafe() override;
|
||||
|
||||
virtual void AddFeature(WorkerId_t id, AuSPtr<Threading::Threads::IThreadFeature> feature, bool async) override;
|
||||
@ -69,8 +69,8 @@ namespace Aurora::Async
|
||||
virtual void AssertInThreadGroup(ThreadGroup_t group) override;
|
||||
virtual void AssertWorker(WorkerId_t id) override;
|
||||
|
||||
virtual AuSPtr<Loop::ILoopQueue> ToKernelWorkQueue() override;
|
||||
virtual AuSPtr<Loop::ILoopQueue> ToKernelWorkQueue(WorkerId_t workerId) override;
|
||||
virtual AuSPtr<AuLoop::ILoopQueue> ToKernelWorkQueue() override;
|
||||
virtual AuSPtr<AuLoop::ILoopQueue> ToKernelWorkQueue(WorkerId_t workerId) override;
|
||||
virtual void UpdateWorkMode(WorkerId_t workerId, RunMode mode) override;
|
||||
virtual ERunMode GetCurrentThreadRunMode() override;
|
||||
virtual ERunMode GetThreadRunMode(WorkerId_t workerId) override;
|
||||
|
@ -16,8 +16,8 @@ namespace Aurora::Async
|
||||
// TODO: this is a hack because i havent implemented an epoll abstraction yet
|
||||
struct AsyncAppWaitSourceRequest
|
||||
{
|
||||
AuConsumer<AuSPtr<Loop::ILoopSource>, bool> callback;
|
||||
AuSPtr<Loop::ILoopSource> loopSource;
|
||||
AuConsumer<AuSPtr<AuLoop::ILoopSource>, bool> callback;
|
||||
AuSPtr<AuLoop::ILoopSource> loopSource;
|
||||
AuUInt32 requestedOffset;
|
||||
AuUInt64 startTime;
|
||||
AuUInt64 endTime;
|
||||
|
@ -22,7 +22,7 @@ namespace Aurora::Async
|
||||
}
|
||||
}
|
||||
|
||||
bool AsyncLoop::AddCallback(const AuSPtr<Loop::ILoopSource> &source, const AuSPtr<Loop::ILoopSourceSubscriber> &subscriber)
|
||||
bool AsyncLoop::AddCallback(const AuSPtr<AuLoop::ILoopSource> &source, const AuSPtr<AuLoop::ILoopSourceSubscriber> &subscriber)
|
||||
{
|
||||
auto ret = LoopQueue::AddCallback(source, subscriber);
|
||||
if (ret)
|
||||
@ -32,7 +32,7 @@ namespace Aurora::Async
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool AsyncLoop::AddCallbackEx(const AuSPtr<Loop::ILoopSource> &source, const AuSPtr<Loop::ILoopSourceSubscriberEx> &subscriber)
|
||||
bool AsyncLoop::AddCallbackEx(const AuSPtr<AuLoop::ILoopSource> &source, const AuSPtr<AuLoop::ILoopSourceSubscriberEx> &subscriber)
|
||||
{
|
||||
auto ret = LoopQueue::AddCallbackEx(source, subscriber);
|
||||
if (ret)
|
||||
@ -42,7 +42,7 @@ namespace Aurora::Async
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool AsyncLoop::AddCallback(const AuSPtr<Loop::ILoopSourceSubscriber> &subscriber)
|
||||
bool AsyncLoop::AddCallback(const AuSPtr<AuLoop::ILoopSourceSubscriber> &subscriber)
|
||||
{
|
||||
auto ret = LoopQueue::AddCallback(subscriber);
|
||||
if (ret)
|
||||
|
@ -7,19 +7,19 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
#include <Source/Loop/Loop.hpp>
|
||||
#include <Source/Loop/LoopQueue.hpp>
|
||||
#include <Source/IO/Loop/Loop.hpp>
|
||||
#include <Source/IO/Loop/LoopQueue.hpp>
|
||||
|
||||
namespace Aurora::Async
|
||||
{
|
||||
struct AsyncLoop : public Loop::LoopQueue
|
||||
struct AsyncLoop : AuLoop::LoopQueue
|
||||
{
|
||||
void OnFrame();
|
||||
|
||||
virtual bool AddCallback (const AuSPtr<Loop::ILoopSource> &source, const AuSPtr<Loop::ILoopSourceSubscriber> &subscriber) override;
|
||||
virtual bool AddCallbackEx(const AuSPtr<Loop::ILoopSource> &source, const AuSPtr<Loop::ILoopSourceSubscriberEx> &subscriber) override;
|
||||
virtual bool AddCallback (const AuSPtr<Loop::ILoopSourceSubscriber> &subscriber) override;
|
||||
virtual bool Commit () override;
|
||||
virtual bool AddCallback (const AuSPtr<AuLoop::ILoopSource> &source, const AuSPtr<AuLoop::ILoopSourceSubscriber> &subscriber) override;
|
||||
virtual bool AddCallbackEx(const AuSPtr<AuLoop::ILoopSource> &source, const AuSPtr<AuLoop::ILoopSourceSubscriberEx> &subscriber) override;
|
||||
virtual bool AddCallback (const AuSPtr<AuLoop::ILoopSourceSubscriber> &subscriber) override;
|
||||
virtual bool Commit () override;
|
||||
|
||||
private:
|
||||
bool commitPending_ {};
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include <Source/Console/Console.hpp>
|
||||
#include <Source/Logging/Sinks/StdConsole.hpp>
|
||||
|
||||
#include <Source/Loop/ILoopSourceEx.hpp>
|
||||
#include <Source/Loop/LSHandle.hpp>
|
||||
#include <Source/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/Loop/ILoopSourceEx.hpp>
|
||||
#include <Source/IO/Loop/LSHandle.hpp>
|
||||
#include <Source/IO/Loop/LSEvent.hpp>
|
||||
|
||||
#include <Source/Console/ConsoleTTY/ConsoleTTY.hpp>
|
||||
|
||||
@ -42,9 +42,9 @@ namespace Aurora::Console::ConsoleStd
|
||||
|
||||
struct ConsoleHasDataLoopSource :
|
||||
#if defined(AURORA_COMPILER_MSVC)
|
||||
virtual Loop::ILoopSource,
|
||||
virtual AuLoop::ILoopSource,
|
||||
#endif
|
||||
virtual Loop::LSEvent
|
||||
virtual AuLoop::LSEvent
|
||||
{
|
||||
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||
ConsoleHasDataLoopSource() : LSEvent(false, false, true)
|
||||
@ -59,7 +59,7 @@ namespace Aurora::Console::ConsoleStd
|
||||
#endif
|
||||
|
||||
bool IsSignaled() override;
|
||||
Loop::ELoopSource GetType() override;
|
||||
AuLoop::ELoopSource GetType() override;
|
||||
bool OnTrigger(AuUInt handle) override;
|
||||
bool WaitOn(AuUInt32 timeout) override;
|
||||
|
||||
|
@ -8,9 +8,9 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "FS.hpp"
|
||||
#include "FileAdvisory.Unix.hpp"
|
||||
#include <Source/Loop/Loop.hpp>
|
||||
#include <Source/Loop/LSHandle.hpp>
|
||||
#include <Source/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/Loop/Loop.hpp>
|
||||
#include <Source/IO/Loop/LSHandle.hpp>
|
||||
#include <Source/IO/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/UNIX/IOSubmit.Linux.hpp>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -11,13 +11,13 @@ namespace Aurora::IO::FS
|
||||
{
|
||||
struct LinuxAsyncFileTransaction;
|
||||
|
||||
struct LinuxAsyncFileTransactionLoopSource : Loop::LSEvent
|
||||
struct LinuxAsyncFileTransactionLoopSource : AuLoop::LSEvent
|
||||
{
|
||||
LinuxAsyncFileTransactionLoopSource(AuSPtr<LinuxAsyncFileTransaction> that);
|
||||
|
||||
virtual bool IsSignaled() override;
|
||||
virtual bool OnTrigger(AuUInt handle) override;
|
||||
virtual Loop::ELoopSource GetType() override;
|
||||
virtual AuLoop::ELoopSource GetType() override;
|
||||
private:
|
||||
AuWPtr<LinuxAsyncFileTransaction> caller_;
|
||||
};
|
||||
@ -68,7 +68,7 @@ namespace Aurora::IO::FS
|
||||
void SetCallback(const AuSPtr<IAsyncFinishedSubscriber> &sub) override;
|
||||
|
||||
bool Wait(AuUInt32 timeout) override;
|
||||
AuSPtr<Loop::ILoopSource> NewLoopSource() override;
|
||||
AuSPtr<AuLoop::ILoopSource> NewLoopSource() override;
|
||||
|
||||
void Reset() override;
|
||||
|
||||
|
@ -9,19 +9,19 @@
|
||||
#include "FS.hpp"
|
||||
#include "Async.NT.hpp"
|
||||
#include "FileAdvisory.NT.hpp"
|
||||
#include <Source/Loop/Loop.hpp>
|
||||
#include <Source/Loop/LSHandle.hpp>
|
||||
#include <Source/IO/Loop/Loop.hpp>
|
||||
#include <Source/IO/Loop/LSHandle.hpp>
|
||||
|
||||
namespace Aurora::IO::FS
|
||||
{
|
||||
struct NtAsyncFileTransactionLoopSource : Loop::LSHandle
|
||||
struct NtAsyncFileTransactionLoopSource : AuLoop::LSHandle
|
||||
{
|
||||
NtAsyncFileTransactionLoopSource(AuSPtr<NtAsyncFileTransaction> that) : caller_(that), Loop::LSHandle(AuUInt(that->GetFileHandle()->handle))
|
||||
{}
|
||||
|
||||
virtual bool IsSignaled() override;
|
||||
virtual bool OnTrigger(AuUInt handle) override;
|
||||
virtual Loop::ELoopSource GetType() override;
|
||||
virtual AuLoop::ELoopSource GetType() override;
|
||||
|
||||
private:
|
||||
AuWPtr<NtAsyncFileTransaction> caller_;
|
||||
@ -433,7 +433,7 @@ namespace Aurora::IO::FS
|
||||
return this->handle_;
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopSource> NtAsyncFileTransaction::NewLoopSource()
|
||||
AuSPtr<AuLoop::ILoopSource> NtAsyncFileTransaction::NewLoopSource()
|
||||
{
|
||||
return AuMakeShared<NtAsyncFileTransactionLoopSource>(AuSharedFromThis());
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ namespace Aurora::IO::FS
|
||||
void SetCallback(const AuSPtr<IAsyncFinishedSubscriber> &sub) override;
|
||||
|
||||
bool Wait(AuUInt32 timeout) override;
|
||||
AuSPtr<Loop::ILoopSource> NewLoopSource() override;
|
||||
AuSPtr<AuLoop::ILoopSource> NewLoopSource() override;
|
||||
|
||||
void Reset();
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
||||
|
||||
namespace Aurora::IO::FS
|
||||
{
|
||||
struct LinuxWatcherHandle : public Loop::LSHandle
|
||||
struct LinuxWatcherHandle : AuLoop::LSHandle
|
||||
{
|
||||
LinuxWatcherHandle(int handle) : Loop::LSHandle(AuUInt(handle))
|
||||
LinuxWatcherHandle(int handle) : AuLoop::LSHandle(AuUInt(handle))
|
||||
{}
|
||||
|
||||
virtual Loop::ELoopSource GetType() override;
|
||||
|
@ -9,8 +9,8 @@
|
||||
***/
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "FS.hpp"
|
||||
#include <Source/Loop/Loop.hpp>
|
||||
#include <Source/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/Loop/Loop.hpp>
|
||||
#include <Source/IO/Loop/LSEvent.hpp>
|
||||
#include "winioctl.h"
|
||||
|
||||
namespace Aurora::IO::FS
|
||||
@ -23,7 +23,7 @@ namespace Aurora::IO::FS
|
||||
NTWatcher *object;
|
||||
};
|
||||
|
||||
struct NTEvent : Loop::LSEvent
|
||||
struct NTEvent : AuLoop::LSEvent
|
||||
{
|
||||
NTEvent(AuSPtr<NTWatchhandle> parent);
|
||||
|
||||
@ -89,7 +89,7 @@ namespace Aurora::IO::FS
|
||||
virtual bool RemoveByName(const AuString &path) override;
|
||||
virtual bool RemoveByPrivateContext(const AuSPtr<UserWatchData> &file) override;
|
||||
|
||||
virtual AuSPtr<Loop::ILoopSource> AsLoopSource() override;
|
||||
virtual AuSPtr<AuLoop::ILoopSource> AsLoopSource() override;
|
||||
|
||||
virtual AuList<WatchEvent> QueryUpdates() override;
|
||||
|
||||
@ -625,9 +625,9 @@ namespace Aurora::IO::FS
|
||||
return true;
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopSource> NTWatcher::AsLoopSource()
|
||||
AuSPtr<AuLoop::ILoopSource> NTWatcher::AsLoopSource()
|
||||
{
|
||||
return AuStaticCast<Loop::ILSEvent>(this->ntEvent_);
|
||||
return AuStaticCast<AuLoop::ILSEvent>(this->ntEvent_);
|
||||
}
|
||||
|
||||
AuList<WatchEvent> NTWatcher::NTWatcher::QueryUpdates()
|
||||
|
@ -15,7 +15,7 @@ namespace Aurora::IO
|
||||
{
|
||||
IOProcessor::IOProcessor(AuUInt threadId, bool tickOnly,
|
||||
AuAsync::WorkerPId_t worker,
|
||||
const AuSPtr<Loop::ILoopQueue> &loop) : mutliplexIOAndTimer(!tickOnly), loopQueue(loop), asyncWorker(worker), threadId(threadId)
|
||||
const AuSPtr<AuLoop::ILoopQueue> &loop) : mutliplexIOAndTimer(!tickOnly), loopQueue(loop), asyncWorker(worker), threadId(threadId)
|
||||
{
|
||||
|
||||
}
|
||||
@ -651,7 +651,7 @@ namespace Aurora::IO
|
||||
return {};
|
||||
}
|
||||
|
||||
AuSPtr<Loop::ILoopQueue> IOProcessor::ToQueue()
|
||||
AuSPtr<AuLoop::ILoopQueue> IOProcessor::ToQueue()
|
||||
{
|
||||
return this->loopQueue;
|
||||
}
|
||||
@ -694,7 +694,7 @@ namespace Aurora::IO
|
||||
return this->threadId == AuThreads::GetThreadId();
|
||||
}
|
||||
|
||||
AUKN_SYM AuSPtr<IIOProcessor> NewIOProcessor(bool tickOnly, const AuSPtr<Loop::ILoopQueue> &queue)
|
||||
AUKN_SYM AuSPtr<IIOProcessor> NewIOProcessor(bool tickOnly, const AuSPtr<AuLoop::ILoopQueue> &queue)
|
||||
{
|
||||
auto processor = AuMakeShared<IOProcessor>(0, tickOnly, AuAsync::WorkerPId_t {}, queue);
|
||||
if (!processor)
|
||||
|
@ -15,7 +15,7 @@ namespace Aurora::IO
|
||||
struct IOProcessor : IIOProcessor, AuEnableSharedFromThis<IOProcessor>, AuAsync::IWorkItemHandler
|
||||
{
|
||||
~IOProcessor();
|
||||
IOProcessor(AuUInt threadId, bool tickOnly, AuAsync::WorkerPId_t worker, const AuSPtr<Loop::ILoopQueue> &loop);
|
||||
IOProcessor(AuUInt threadId, bool tickOnly, AuAsync::WorkerPId_t worker, const AuSPtr<AuLoop::ILoopQueue> &loop);
|
||||
|
||||
bool Init();
|
||||
|
||||
@ -61,7 +61,7 @@ namespace Aurora::IO
|
||||
|
||||
AuSPtr<IIOPipeProcessor> ToPipeProcessor() override;
|
||||
|
||||
AuSPtr<Loop::ILoopQueue> ToQueue() override;
|
||||
AuSPtr<AuLoop::ILoopQueue> ToQueue() override;
|
||||
void ReleaseAllWatches() override;
|
||||
|
||||
bool HasItems() override;
|
||||
@ -70,7 +70,7 @@ namespace Aurora::IO
|
||||
|
||||
bool RequestRemovalForItemFromAnyThread(const AuSPtr<IIOProcessorItem> &processor);
|
||||
|
||||
AuSPtr<Loop::ILoopQueue> loopQueue;
|
||||
AuSPtr<AuLoop::ILoopQueue> loopQueue;
|
||||
|
||||
AuUInt threadId;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
namespace Aurora::IO
|
||||
{
|
||||
bool IOProcessorTimers::Init(IOProcessor *parent, AuSPtr<Loop::ITimer> lsTicker)
|
||||
bool IOProcessorTimers::Init(IOProcessor *parent, AuSPtr<AuLoop::ITimer> lsTicker)
|
||||
{
|
||||
this->parent = parent;
|
||||
this->lsTicker = lsTicker;
|
||||
|
@ -14,10 +14,10 @@ namespace Aurora::IO
|
||||
struct IOProcessorTimers : AuLoop::ILoopSourceSubscriber
|
||||
{
|
||||
IOProcessor *parent {};
|
||||
AuSPtr<Loop::ITimer> lsTicker;
|
||||
AuSPtr<AuLoop::ITimer> lsTicker;
|
||||
Utility::RateLimiter nbTicker;
|
||||
|
||||
bool Init(IOProcessor *parent, AuSPtr<Loop::ITimer> lsTicker);
|
||||
bool Init(IOProcessor *parent, AuSPtr<AuLoop::ITimer> lsTicker);
|
||||
|
||||
bool OnFinished(const AuSPtr<AuLoop::ILoopSource> &source) override;
|
||||
};
|
||||
|
2
Source/IPC/IPC.cpp → Source/IO/IPC/IPC.cpp
Executable file → Normal file
2
Source/IPC/IPC.cpp → Source/IO/IPC/IPC.cpp
Executable file → Normal file
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "IPC.hpp"
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
|
||||
}
|
2
Source/IPC/IPC.hpp → Source/IO/IPC/IPC.hpp
Executable file → Normal file
2
Source/IPC/IPC.hpp → Source/IO/IPC/IPC.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
#if defined(AURORA_IS_POSIX_DERIVED)
|
||||
|
2
Source/IPC/IPCHandle.cpp → Source/IO/IPC/IPCHandle.cpp
Executable file → Normal file
2
Source/IPC/IPCHandle.cpp → Source/IO/IPC/IPCHandle.cpp
Executable file → Normal file
@ -9,7 +9,7 @@
|
||||
#include "IPC.hpp"
|
||||
#include "IPCHandle.hpp"
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
#define AURORA_IPC_BRAND "AuroraIPC_"
|
||||
|
2
Source/IPC/IPCHandle.hpp → Source/IO/IPC/IPCHandle.hpp
Executable file → Normal file
2
Source/IPC/IPCHandle.hpp → Source/IO/IPC/IPCHandle.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
struct IPCHandle
|
||||
{
|
@ -10,10 +10,10 @@
|
||||
#include "IPCHandle.hpp"
|
||||
#include "IPCMemory.NT.hpp"
|
||||
|
||||
#include <Source/IPC/IPC.hpp>
|
||||
#include <Source/IPC/IPCHandle.hpp>
|
||||
#include <Source/IO/IPC/IPC.hpp>
|
||||
#include <Source/IO/IPC/IPCHandle.hpp>
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Shared memory
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
|
||||
}
|
6
Source/IPC/IPCMemory.Unix.cpp → Source/IO/IPC/IPCMemory.Unix.cpp
Executable file → Normal file
6
Source/IPC/IPCMemory.Unix.cpp → Source/IO/IPC/IPCMemory.Unix.cpp
Executable file → Normal file
@ -10,14 +10,14 @@
|
||||
#include "IPCHandle.hpp"
|
||||
#include "IPCMemory.Unix.hpp"
|
||||
|
||||
#include <Source/IPC/IPC.hpp>
|
||||
#include <Source/IPC/IPCHandle.hpp>
|
||||
#include <Source/IO/IPC/IPC.hpp>
|
||||
#include <Source/IO/IPC/IPCHandle.hpp>
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h> /* For mode constants */
|
||||
#include <fcntl.h> /* For O_* constants */
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Shared memory
|
2
Source/IPC/IPCMemory.Unix.hpp → Source/IO/IPC/IPCMemory.Unix.hpp
Executable file → Normal file
2
Source/IPC/IPCMemory.Unix.hpp → Source/IO/IPC/IPCMemory.Unix.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
|
||||
}
|
@ -10,12 +10,12 @@
|
||||
#include "IPCHandle.hpp"
|
||||
#include "IPCPipe.NT.hpp"
|
||||
|
||||
#include <Source/Loop/ILoopSourceEx.hpp>
|
||||
#include <Source/Loop/LSHandle.hpp>
|
||||
#include <Source/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/Loop/ILoopSourceEx.hpp>
|
||||
#include <Source/IO/Loop/LSHandle.hpp>
|
||||
#include <Source/IO/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/FS/Async.NT.hpp>
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Pipes
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
|
||||
}
|
8
Source/IPC/IPCPipe.Unix.cpp → Source/IO/IPC/IPCPipe.Unix.cpp
Executable file → Normal file
8
Source/IPC/IPCPipe.Unix.cpp → Source/IO/IPC/IPCPipe.Unix.cpp
Executable file → Normal file
@ -12,16 +12,16 @@
|
||||
|
||||
#include <Source/IO/UNIX/FDIpcServer.hpp>
|
||||
|
||||
#include <Source/Loop/ILoopSourceEx.hpp>
|
||||
#include <Source/Loop/LSHandle.hpp>
|
||||
#include <Source/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/Loop/ILoopSourceEx.hpp>
|
||||
#include <Source/IO/Loop/LSHandle.hpp>
|
||||
#include <Source/IO/Loop/LSEvent.hpp>
|
||||
|
||||
#include <Source/IO/UNIX/IOSubmit.Linux.hpp>
|
||||
#include <Source/IO/FS/Async.Linux.hpp>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Pipes
|
2
Source/IPC/IPCPipe.Unix.hpp → Source/IO/IPC/IPCPipe.Unix.hpp
Executable file → Normal file
2
Source/IPC/IPCPipe.Unix.hpp → Source/IO/IPC/IPCPipe.Unix.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
|
||||
}
|
12
Source/IPC/IPCPrimitives.Linux.cpp → Source/IO/IPC/IPCPrimitives.Linux.cpp
Executable file → Normal file
12
Source/IPC/IPCPrimitives.Linux.cpp → Source/IO/IPC/IPCPrimitives.Linux.cpp
Executable file → Normal file
@ -10,16 +10,16 @@
|
||||
#include "IPCHandle.hpp"
|
||||
#include "IPCPrimitives.Linux.hpp"
|
||||
|
||||
#include <Source/Loop/LSEvent.hpp>
|
||||
#include <Source/Loop/LSSemaphore.hpp>
|
||||
#include <Source/Loop/LSMutex.hpp>
|
||||
#include <Source/IO/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/Loop/LSSemaphore.hpp>
|
||||
#include <Source/IO/Loop/LSMutex.hpp>
|
||||
|
||||
#include <Source/IPC/IPC.hpp>
|
||||
#include <Source/IPC/IPCHandle.hpp>
|
||||
#include <Source/IO/IPC/IPC.hpp>
|
||||
#include <Source/IO/IPC/IPCHandle.hpp>
|
||||
|
||||
#include <Source/IO/UNIX/FDIpcServer.hpp>
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
#define IMPLEMENT_HANDLE \
|
||||
IPC::IPCHandle handle_; \
|
2
Source/IPC/IPCPrimitives.Linux.hpp → Source/IO/IPC/IPCPrimitives.Linux.hpp
Executable file → Normal file
2
Source/IPC/IPCPrimitives.Linux.hpp → Source/IO/IPC/IPCPrimitives.Linux.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
|
||||
}
|
8
Source/IPC/IPCPrimitives.NT.cpp → Source/IO/IPC/IPCPrimitives.NT.cpp
Executable file → Normal file
8
Source/IPC/IPCPrimitives.NT.cpp → Source/IO/IPC/IPCPrimitives.NT.cpp
Executable file → Normal file
@ -10,11 +10,11 @@
|
||||
#include "IPCHandle.hpp"
|
||||
#include "IPCPrimitives.NT.hpp"
|
||||
|
||||
#include <Source/Loop/LSMutex.hpp>
|
||||
#include <Source/Loop/LSSemaphore.hpp>
|
||||
#include <Source/Loop/LSEvent.hpp>
|
||||
#include <Source/IO/Loop/LSMutex.hpp>
|
||||
#include <Source/IO/Loop/LSSemaphore.hpp>
|
||||
#include <Source/IO/Loop/LSEvent.hpp>
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
#define IMPLEMENT_HANDLE \
|
||||
IPC::IPCHandle handle_; \
|
2
Source/IPC/IPCPrimitives.NT.hpp → Source/IO/IPC/IPCPrimitives.NT.hpp
Executable file → Normal file
2
Source/IPC/IPCPrimitives.NT.hpp → Source/IO/IPC/IPCPrimitives.NT.hpp
Executable file → Normal file
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::IPC
|
||||
namespace Aurora::IO::IPC
|
||||
{
|
||||
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct ILoopSourceEx : virtual ILoopSource
|
||||
{
|
@ -9,7 +9,7 @@
|
||||
#include "LSAsync.hpp"
|
||||
#include "LSEvent.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
class AsyncWaiter : public LSEvent
|
||||
{
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
AuSPtr<ILSEvent> NewLSAsync();
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "LSCondition.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
AUKN_SYM AuSPtr<IConditionVar> NewLSCondVar(const AuSPtr<AuThreading::IWaitable> &primitive)
|
||||
{
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
|
||||
#if defined(IMPL_LS_EVENT_GEN)
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
#include "LSEvent.hpp"
|
||||
#include "LSFromFdNonblocking.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSEvent::LSEvent(bool triggered, bool atomicRelease, bool permitMultipleTriggers) : atomicRelease_(atomicRelease)
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct LSEvent : ILSEvent, virtual LSHandle
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "LSEvent.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSEvent::LSEvent(HANDLE h) : LSHandle(AuUInt(h))
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct LSEvent : ILSEvent, virtual LSHandle
|
||||
{
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
template<typename T>
|
||||
inline bool IsSignaledFromNonblockingImpl(ILoopSourceEx *source, T * that, bool(T::*IsSignaledNonblocking)())
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSHandle::LSHandle()
|
||||
{}
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "WaitSingle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||
static constexpr auto kInvalidHandle = (AuUInt)INVALID_HANDLE_VALUE;
|
@ -10,7 +10,7 @@
|
||||
|
||||
#if defined(IMPL_LS_MUTEX_GEN)
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
#include "LSMutex.hpp"
|
||||
#include "LSFromFdNonblocking.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSMutex::LSMutex()
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct LSMutex : ILSMutex, public LSHandle
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "LSMutex.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSMutex::LSMutex(HANDLE handle) : LSHandle(AuReinterpretCast<AuUInt>(handle))
|
||||
{}
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct LSMutex : ILSMutex, virtual LSHandle
|
||||
{
|
@ -10,7 +10,7 @@
|
||||
|
||||
#if defined(IMPL_LS_SEM_GEN)
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
#include "LSSemaphore.hpp"
|
||||
#include "LSFromFdNonblocking.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSSemaphore::LSSemaphore(AuUInt32 initialCount)
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct LSSemaphore : ILSSemaphore, virtual LSHandle
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "LSSemaphore.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSSemaphore::LSSemaphore(HANDLE handle) : LSHandle(AuReinterpretCast<AuUInt>(handle))
|
||||
{}
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct LSSemaphore : ILSSemaphore, virtual LSHandle
|
||||
{
|
@ -10,7 +10,7 @@
|
||||
|
||||
#if defined(IMPL_LS_TIMER_GEN)
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
#include <Source/Time/Time.hpp>
|
||||
#include <sys/timerfd.h>
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSTimer::LSTimer(AuUInt32 reschedStepMsOrZero, AuUInt32 maxIterationsOrZero, bool bSingleshot, int handle) :
|
||||
LSHandle(handle),
|
@ -8,9 +8,9 @@
|
||||
#pragma once
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct LSTimer : ITimer, virtual LSHandle
|
||||
struct LSTimer : ITimer, virtual LSHandle
|
||||
{
|
||||
LSTimer(AuUInt32 reschedStepMsOrZero, AuUInt32 maxIterationsOrZero, bool bSingleshot, int handle);
|
||||
~LSTimer();
|
@ -9,7 +9,7 @@
|
||||
#include "LSTimer.hpp"
|
||||
#include <Source/Time/Time.hpp>
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
LSTimer::LSTimer(AuUInt32 reschedStepMsOrZero, AuUInt32 maxIterationsOrZero, bool bSingleshot, HANDLE handle) :
|
||||
LSHandle(AuReinterpretCast<AuUInt>(handle)),
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "LSHandle.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct LSTimer : ITimer, virtual LSHandle
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "LSWin32.NT.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
bool Win32Dummy::IsSignaled()
|
||||
{
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
struct Win32Dummy : ILoopSource
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "Loop.BSD.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
// TODO: kevent + pipe abuse
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
#include "ILoopSourceEx.hpp"
|
||||
#include "LSWin32.NT.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
AUKN_SYM AuList<AuSPtr<ILoopSource>> WaitMultipleOrObjects(const AuList<AuSPtr<ILoopSource>> &objects, AuUInt32 timeout)
|
||||
{
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "Loop.Unix.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "Loop.hpp"
|
||||
|
||||
namespace Aurora::Loop
|
||||
namespace Aurora::IO::Loop
|
||||
{
|
||||
#if !defined(AURORA_IS_MODERNNT_DERIVED)
|
||||
AUKN_SYM AuSPtr<ILoopSource> NewLSWin32Source(bool)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user