AuroraRuntime/Source/Loop/LoopQueue.Linux.cpp

111 lines
2.7 KiB
C++
Raw Normal View History

2022-04-05 05:59:23 +00:00
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: LoopQueue.Linux.cpp
Date: 2022-4-5
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "Loop.NT.hpp"
#include "ILoopSourceEx.hpp"
#include "LoopQueue.Linux.hpp"
namespace Aurora::Loop
{
// On Linux, Loop Queues are glorified eventfd to epoll adapters.
// Requeuing the cached fd array per frame on the TLS io_submit object
// would be more costly than maintaining an epoll for all fds tracked
// by the loop queue.
// We can delegate the wait functions to an NT overlapped like shim
// where all eventfds are one epoll handle
// The TLS worker would get awoken by any changes in the epoll queue
// or if the io submit object should preemptively abort
// The TLS worker would remain resposible for scheduling thread local
// network and file transactions independent from the loop queues
// As such, loop queues continue to be defined as a mechanism to merely
// wait, not dispatch/manage work
// Delegating mutex reads to a single io_submit would be a linux-specific
// kevent-non-reusable ThreadWorkerQueueShim hack
// ...it wouldn't make sense create another loop queue per thread concept
// outside of the async subsystem (not counting TLS overlapped io)
2022-04-05 05:59:23 +00:00
LoopQueue::LoopQueue()
{
}
LoopQueue::~LoopQueue()
{
}
bool LoopQueue::SourceAdd(const AuSPtr<ILoopSource> &source)
{
return {};
}
bool LoopQueue::SourceAddWithTimeout(const AuSPtr<ILoopSource> &source, AuUInt32 ms)
{
return {};
}
bool LoopQueue::SourceRemove(const AuSPtr<ILoopSource> &source)
{
return {};
}
AuUInt32 LoopQueue::GetSourceCount()
{
return {};
}
bool LoopQueue::AddCallback(const AuSPtr<ILoopSource> &source, const AuSPtr<ILoopSourceSubscriber> &subscriber)
{
return {};
}
bool LoopQueue::AddCallbackEx(const AuSPtr<ILoopSource> &source, const AuSPtr<ILoopSourceSubscriberEx> &subscriber)
{
return {};
}
bool LoopQueue::AddCallback(const AuSPtr<ILoopSourceSubscriber> &subscriber)
{
return {};
}
void LoopQueue::ChugPathConfigure(AuUInt32 sectionTickTime, AuSInt sectionDequeCount)
{
}
void LoopQueue::ChugHint(bool value)
{
}
bool LoopQueue::Commit()
{
return true;
2022-04-05 05:59:23 +00:00
}
bool LoopQueue::IsSignaled()
{
return {};
}
bool LoopQueue::WaitAll(AuUInt32 timeout)
{
return {};
}
AuUInt32 LoopQueue::WaitAny(AuUInt32 timeout)
{
return {};
}
AuList<AuSPtr<ILoopSource>> LoopQueue::WaitAnyEx(AuUInt32 timeout)
{
return {};
}
}