[*] Refactor

[+] IProcessSectionView::GetStart
[+] IProcessSectionView::GetEnd
This commit is contained in:
Reece Wilson 2022-12-17 20:14:19 +00:00
parent 9ce314a838
commit 4e6f116925
75 changed files with 414 additions and 339 deletions

View File

@ -13,6 +13,10 @@ namespace Aurora::Process
struct IProcessSectionView
{
virtual AuUInt GetStart() = 0;
virtual AuUInt GetEnd() = 0;
virtual AuSPtr<IProcessSectionMapView> Allocate(AuUInt uLength) = 0;
virtual AuSPtr<IProcessSectionMapView> AllocateEx(AuUInt uLength,

View File

@ -11,7 +11,7 @@
#include "ExceptionWatcher.Win32.hpp"
#include "Stack.Win32.hpp"
#include <Source/Process/ProcessMap.Win32.hpp>
#include <Source/Process/AuProcessMap.Win32.hpp>
#include <Source/Telemetry/Telemetry.hpp>
#include <Windows.h>
@ -21,7 +21,7 @@
#include <vcruntime_exception.h>
#include <ehdata.h>
#include <Source/Process/ProcessMap.hpp>
#include <Source/Process/AuProcessMap.hpp>
#include <Source/IO/FS/FS.hpp>
#include <Source/Grug/AuGrug.hpp>

View File

@ -9,8 +9,8 @@
#include "Stack.hpp"
#include "Stack.Win32.hpp"
#include <Dbghelp.h>
#include <Source/Process/ProcessMap.hpp>
#include <Source/Process/ProcessMap.Win32.hpp>
#include <Source/Process/AuProcessMap.hpp>
#include <Source/Process/AuProcessMap.Win32.hpp>
namespace Aurora::Debug
{

View File

@ -1,21 +1,21 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ByteBufferStreamPair.cpp
File: AuByteBufferStreamPair.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "ByteBufferStreamPair.hpp"
#include "AuByteBufferStreamPair.hpp"
namespace Aurora::IO
{
ByteBufferStreamPair::ByteBufferStreamPair(const AuSPtr<Memory::ByteBuffer> &buffer) :
buffer(buffer),
reader(buffer),
writer(buffer),
seeker(buffer)
ByteBufferStreamPair::ByteBufferStreamPair(const AuSPtr<Memory::ByteBuffer> &pBuffer) :
pBuffer(pBuffer),
reader(pBuffer),
writer(pBuffer),
seeker(pBuffer)
{
}
@ -27,7 +27,7 @@ namespace Aurora::IO
AuSPtr<ISeekingReader> ByteBufferStreamPair::ToSeekingReader()
{
if (this->buffer->flagCircular)
if (this->pBuffer->flagCircular)
{
SysPushErrorIO("ring buffer must not be seekable");
return {};
@ -43,7 +43,7 @@ namespace Aurora::IO
AuSPtr<Memory::ByteBuffer> ByteBufferStreamPair::ToByteBuffer()
{
return this->buffer;
return this->pBuffer;
}
AUKN_SYM AuSPtr<IByteBufferStreamPair> NewByteBufferPair()
@ -58,9 +58,9 @@ namespace Aurora::IO
return AuMakeShared<ByteBufferStreamPair>(scalable);
}
AUKN_SYM AuSPtr<IByteBufferStreamPair> NewByteBufferPairEx(AuUInt length, bool permitResize)
AUKN_SYM AuSPtr<IByteBufferStreamPair> NewByteBufferPairEx(AuUInt uLength, bool bPermitResize)
{
auto buffer = AuMakeShared<AuByteBuffer>(length, false, permitResize);
auto buffer = AuMakeShared<AuByteBuffer>(uLength, false, bPermitResize);
if (!buffer)
{
SysPushErrorMem();
@ -70,9 +70,9 @@ namespace Aurora::IO
return AuMakeShared<ByteBufferStreamPair>(buffer);
}
AUKN_SYM AuSPtr<IByteBufferStreamPair> NewRingByteBuffer(AuUInt length)
AUKN_SYM AuSPtr<IByteBufferStreamPair> NewRingByteBuffer(AuUInt uLength)
{
auto buffer = AuMakeShared<AuByteBuffer>(length, false, false);
auto buffer = AuMakeShared<AuByteBuffer>(uLength, false, false);
if (!buffer)
{
SysPushErrorMem();

View File

@ -11,7 +11,7 @@ namespace Aurora::IO
{
struct ByteBufferStreamPair : IByteBufferStreamPair, AuEnableSharedFromThis<ByteBufferStreamPair>
{
ByteBufferStreamPair(const AuSPtr<Memory::ByteBuffer> &buffer);
ByteBufferStreamPair(const AuSPtr<Memory::ByteBuffer> &pBuffer);
AuSPtr<IStreamReader> ToStreamReader() override;
AuSPtr<ISeekingReader> ToSeekingReader() override;
@ -19,7 +19,7 @@ namespace Aurora::IO
AuSPtr<Memory::ByteBuffer> ToByteBuffer() override;
AuSPtr<Memory::ByteBuffer> buffer;
AuSPtr<Memory::ByteBuffer> pBuffer;
Buffered::BlobReader reader;
Buffered::BlobWriter writer;
Buffered::BlobSeekableReader seeker;

View File

@ -1,14 +1,14 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOAdapterAsyncStream.cpp
File: AuIOAdapterAsyncStream.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOAdapterAsyncStream.hpp"
#include "IOWaitableIOLoopSource.hpp"
#include "AuIOAdapterAsyncStream.hpp"
#include "AuIOWaitableIOLoopSource.hpp"
namespace Aurora::IO
{
@ -23,14 +23,14 @@ namespace Aurora::IO
void Close() override;
EStreamError BeginRead(const AuSPtr<Memory::MemoryViewWrite> &internalView) override;
EStreamError Dequeue(AuUInt reqLength, Memory::MemoryViewWrite &out) override;
EStreamError Dequeue(AuUInt uReqLength, Memory::MemoryViewWrite &out) override;
};
struct AsyncStreamMemory : AuMemoryViewWrite
{
AsyncStreamMemory(const AuMemoryViewWrite &ref);
AsyncStreamMemory(const AuSPtr<AuMemoryViewWrite> &ref);
AsyncStreamMemory(AuUInt length);
AsyncStreamMemory(AuUInt uLength);
~AsyncStreamMemory();
bool IsValid();
@ -62,7 +62,7 @@ namespace Aurora::IO
{
AsyncStreamAdapter();
AuSPtr<AsyncStreamMemory> AllocateNextPageCached(AuUInt64 length);
AuSPtr<AsyncStreamMemory> AllocateNextPageCached(AuUInt64 uLength);
virtual AuSPtr<IAsyncStreamReader> ToStreamReader() override;
virtual AuSPtr<IStreamWriter> ToStreamWriter() override;
@ -71,14 +71,14 @@ namespace Aurora::IO
virtual bool Reset() override;
bool Init(const AuSPtr<IAsyncTransaction> &transaction, bool isStream);
bool Init(const AuSPtr<IAsyncTransaction> &transaction, bool bIsStream);
AuSPtr<AsyncStreamMemory> lastAllocation;
AuSPtr<IAsyncTransaction> transaction;
bool SetFlushOnWrite(bool value) override;
void ReserveBuffer(AuUInt64 length) override;
void ReserveBuffer(AuUInt64 uLength) override;
AuUInt64 GetReadOffset() override;
AuUInt64 SetReadOffset(AuUInt64 offset) override;
@ -86,19 +86,21 @@ namespace Aurora::IO
AuUInt64 GetWriteOffset() override;
AuUInt64 SetWriteOffset(AuUInt64 offset) override;
bool asyncActive {};
bool bAsyncActive {};
bool bIsStream {};
bool bFlushOnWrite { true };
AuUInt64 readOffset {};
AuUInt64 writeOffset {};
bool isStream {};
bool flushOnWrite {true};
AuOptionalEx<EStreamError> errorCode;
int locked {};
IOWatachableIOLoopSource source;
// impl
AsyncStreamReader reader;
AsyncStreamWriter writer;
IOWatachableIOLoopSource source;
};
@ -115,7 +117,7 @@ namespace Aurora::IO
}
AsyncStreamMemory::AsyncStreamMemory(AuUInt length) : AuMemoryViewWrite(AuMemory::ZAlloc<AuUInt8*>(length, AuHwInfo::GetPageSize()), length)
AsyncStreamMemory::AsyncStreamMemory(AuUInt uLength) : AuMemoryViewWrite(AuMemory::ZAlloc<AuUInt8*>(uLength, AuHwInfo::GetPageSize()), uLength)
{
this->owned = true;
}
@ -136,7 +138,7 @@ namespace Aurora::IO
bool AsyncStreamAdapter::SetFlushOnWrite(bool value)
{
return AuExchange(this->flushOnWrite, value);
return AuExchange(this->bFlushOnWrite, value);
}
AuUInt64 AsyncStreamAdapter::GetReadOffset()
@ -167,14 +169,14 @@ namespace Aurora::IO
return AuExchange(this->writeOffset, offset);
}
bool AsyncStreamAdapter::Init(const AuSPtr<IAsyncTransaction> &transaction, bool isStream)
bool AsyncStreamAdapter::Init(const AuSPtr<IAsyncTransaction> &transaction, bool bIsStream)
{
this->transaction = transaction;
this->lastAllocation.reset();
this->asyncActive = false;
this->bAsyncActive = false;
this->reader.parent = this;
this->writer.parent = this;
this->isStream = isStream;
this->bIsStream = bIsStream;
return true;
}
@ -183,17 +185,17 @@ namespace Aurora::IO
}
AuSPtr<AsyncStreamMemory> AsyncStreamAdapter::AllocateNextPageCached(AuUInt64 length)
AuSPtr<AsyncStreamMemory> AsyncStreamAdapter::AllocateNextPageCached(AuUInt64 uLength)
{
if (this->lastAllocation)
{
if (this->lastAllocation->length >= length)
if (this->lastAllocation->length >= uLength)
{
return this->lastAllocation;
}
}
auto newMem = AuMakeShared<AsyncStreamMemory>(length);
auto newMem = AuMakeShared<AsyncStreamMemory>(uLength);
if (!newMem)
{
SysPushErrorMem();
@ -220,9 +222,9 @@ namespace Aurora::IO
{
if (parent->lastAllocation)
{
auto length = parent->transaction->GetLastPacketLength();
if (length &&
parent->lastAllocation->streamIndex != length)
auto uLength = parent->transaction->GetLastPacketLength();
if (uLength &&
parent->lastAllocation->streamIndex != uLength)
{
AuDebugBreak();
return EStreamError::eErrorStreamInterrupted;
@ -231,7 +233,7 @@ namespace Aurora::IO
parent->lastAllocation.reset();
}
if (parent->asyncActive && !parent->transaction->Complete())
if (parent->bAsyncActive && !parent->transaction->Complete())
{
AuDebugBreak();
return EStreamError::eErrorStreamInterrupted;
@ -239,7 +241,7 @@ namespace Aurora::IO
// Async success or blank state
parent->transaction->Reset();
parent->asyncActive = true;
parent->bAsyncActive = true;
parent->lastAllocation = AuMakeShared<AsyncStreamMemory>(internalView);
if (!parent->lastAllocation)
@ -250,9 +252,9 @@ namespace Aurora::IO
parent->lastAllocation->streamIndex = 0;
if (!parent->transaction->StartRead(parent->isStream ? 0 : parent->readOffset, parent->lastAllocation))
if (!parent->transaction->StartRead(parent->bIsStream ? 0 : parent->readOffset, parent->lastAllocation))
{
parent->asyncActive = false;
parent->bAsyncActive = false;
SysPushErrorNested("Couldn't start async aio read");
return EStreamError::eErrorStreamInterrupted;
}
@ -260,7 +262,7 @@ namespace Aurora::IO
return EStreamError::eErrorNone;
}
EStreamError AsyncStreamReader::Dequeue(AuUInt reqLength, Memory::MemoryViewWrite &out)
EStreamError AsyncStreamReader::Dequeue(AuUInt uReqLength, Memory::MemoryViewWrite &out)
{
out = {};
@ -272,7 +274,7 @@ namespace Aurora::IO
// Transaction error
if (parent->transaction->Failed())
{
parent->asyncActive = false;
parent->bAsyncActive = false;
parent->transaction->Reset();
SysPushErrorIO("IO: {}", parent->transaction->GetOSErrorCode());
return EStreamError::eErrorStreamInterrupted;
@ -281,51 +283,51 @@ namespace Aurora::IO
// Async error
if (parent->errorCode.HasValue())
{
auto code = parent->isStream ?
auto code = parent->bIsStream ?
parent->errorCode.Value() :
AuExchange(parent->errorCode, {}).Value();
if (code != EStreamError::eErrorNone)
{
parent->asyncActive = false;
parent->bAsyncActive = false;
parent->transaction->Reset();
return code;
}
}
auto length = parent->transaction->GetLastPacketLength();
if (!length)
auto uLength = parent->transaction->GetLastPacketLength();
if (!uLength)
{
parent->asyncActive = false;
parent->bAsyncActive = false;
parent->transaction->Reset();
return EStreamError::eErrorNone;
}
auto streamIndex = parent->lastAllocation->streamIndex;
if (streamIndex == length)
if (streamIndex == uLength)
{
return EStreamError::eErrorNone;
}
auto toRead = AuMin<AuUInt>(parent->lastAllocation->length, length - streamIndex);
auto bRequestedLen = bool(reqLength);
auto toRead = AuMin<AuUInt>(parent->lastAllocation->length, uLength - streamIndex);
auto bRequestedLen = bool(uReqLength);
out.ptr = this->parent->lastAllocation->ToPointer() + streamIndex;
out.length = reqLength ? AuMin(toRead, reqLength) : toRead;
out.length = uReqLength ? AuMin(toRead, uReqLength) : toRead;
if (bRequestedLen)
{
streamIndex += out.length;
parent->lastAllocation->streamIndex = streamIndex;
if (!parent->isStream)
if (!parent->bIsStream)
{
parent->readOffset += out.length;
}
if (parent->lastAllocation->streamIndex == length)
if (parent->lastAllocation->streamIndex == uLength)
{
parent->asyncActive = false;
parent->bAsyncActive = false;
parent->transaction->Reset();
}
}
@ -344,32 +346,32 @@ namespace Aurora::IO
// Read from the last tranaction, if not fully consumed
if (parent->lastAllocation)
{
auto length = parent->transaction->GetLastPacketLength();
if (length &&
parent->lastAllocation->streamIndex != length)
auto uLength = parent->transaction->GetLastPacketLength();
if (uLength &&
parent->lastAllocation->streamIndex != uLength)
{
auto toRead = AuMin<AuUInt>(parameters.length, length - parent->lastAllocation->streamIndex);
auto toRead = AuMin<AuUInt>(parameters.length, uLength - parent->lastAllocation->streamIndex);
if (toRead)
{
if (parameters.ptr)
{
AuMemcpy(parameters.ptr, parent->lastAllocation->Begin<AuUInt8>() + parent->lastAllocation->streamIndex, toRead);
if (parent->isStream)
if (parent->bIsStream)
{
parent->lastAllocation->streamIndex += toRead;
}
else
{
parent->lastAllocation->streamIndex += length;
parent->readOffset += length;
parent->lastAllocation->streamIndex += uLength;
parent->readOffset += uLength;
}
}
}
if (parent->isStream)
if (parent->bIsStream)
{
parent->lastAllocation->streamIndex += length;
parent->lastAllocation->streamIndex += uLength;
}
parameters.outVariable = toRead;
@ -387,7 +389,7 @@ namespace Aurora::IO
// Async error
if (parent->errorCode.HasValue())
{
auto code = parent->isStream ?
auto code = parent->bIsStream ?
parent->errorCode.Value() :
AuExchange(parent->errorCode, {}).Value();
@ -398,7 +400,7 @@ namespace Aurora::IO
}
// Async awaiting response
if (parent->asyncActive && !parent->transaction->Complete())
if (parent->bAsyncActive && !parent->transaction->Complete())
{
parameters.outVariable = 0;
return EStreamError::eErrorNone;
@ -406,14 +408,14 @@ namespace Aurora::IO
// Async success or blank state
parent->transaction->Reset();
parent->asyncActive = true;
parent->bAsyncActive = true;
parent->lastAllocation = parent->AllocateNextPageCached(parameters.length);
parent->lastAllocation->streamIndex = 0;
if (!parent->transaction->StartRead(parent->isStream ? 0 : parent->readOffset, parent->lastAllocation))
if (!parent->transaction->StartRead(parent->bIsStream ? 0 : parent->readOffset, parent->lastAllocation))
{
parent->asyncActive = false;
parent->bAsyncActive = false;
SysPushErrorNested("Couldn't start async aio read");
return EStreamError::eErrorStreamInterrupted;
}
@ -454,7 +456,7 @@ namespace Aurora::IO
if (parent->errorCode.HasValue())
{
auto code = parent->isStream ?
auto code = parent->bIsStream ?
parent->errorCode.Value() :
AuExchange(parent->errorCode, {}).Value();
@ -486,7 +488,7 @@ namespace Aurora::IO
return EStreamError::eErrorStreamInterrupted;
}
if (this->parent->flushOnWrite)
if (this->parent->bFlushOnWrite)
{
Frame();
}
@ -534,14 +536,14 @@ namespace Aurora::IO
}
else
{
AuUInt length {};
AuUInt uLength {};
for (auto &a : this->writesPending)
{
length += a->length;
uLength += a->length;
}
buffer = this->parent->AllocateNextPageCached(length);
buffer = this->parent->AllocateNextPageCached(uLength);
if (!buffer)
{
return;
@ -565,7 +567,7 @@ namespace Aurora::IO
// Async success or blank state
parent->transaction->Reset();
parent->asyncActive = true;
parent->bAsyncActive = true;
struct WriteMem : AuMemoryViewRead
{
@ -586,9 +588,9 @@ namespace Aurora::IO
parent->lastAllocation = buffer;
parent->lastAllocation->streamIndex = 0;
if (!parent->transaction->StartWrite(parent->isStream ? 0 : parent->writeOffset, annoying))
if (!parent->transaction->StartWrite(parent->bIsStream ? 0 : parent->writeOffset, annoying))
{
parent->asyncActive = false;
parent->bAsyncActive = false;
SysPushErrorNested("Couldn't start async aio write");
return;
}
@ -637,11 +639,11 @@ namespace Aurora::IO
return AuSPtr<IIOWaitableItem>(AuSharedFromThis(), &this->source);
}
void AsyncStreamAdapter::ReserveBuffer(AuUInt64 length)
void AsyncStreamAdapter::ReserveBuffer(AuUInt64 uLength)
{
if (!this->lastAllocation || !this->asyncActive)
if (!this->lastAllocation || !this->bAsyncActive)
{
this->lastAllocation = this->AllocateNextPageCached(length);
this->lastAllocation = this->AllocateNextPageCached(uLength);
}
}
@ -657,7 +659,7 @@ namespace Aurora::IO
this->writer.Flush();
}
if (this->asyncActive)
if (this->bAsyncActive)
{
if (!this->transaction->Complete())
{
@ -672,25 +674,25 @@ namespace Aurora::IO
return true;
}
AUKN_SYM AuSPtr<IAsyncStreamAdapter> NewAsyncStreamAdapter(const AuSPtr<IAsyncTransaction> &transaction, bool isStream)
AUKN_SYM AuSPtr<IAsyncStreamAdapter> NewAsyncStreamAdapter(const AuSPtr<IAsyncTransaction> &pTransaction, bool bIsStream)
{
if (!transaction)
if (!pTransaction)
{
SysPushErrorArg();
return {};
}
auto adapter = AuMakeShared<AsyncStreamAdapter>();
if (!adapter)
auto pAdapter = AuMakeShared<AsyncStreamAdapter>();
if (!pAdapter)
{
return {};
}
if (!adapter->Init(transaction, isStream))
if (!pAdapter->Init(pTransaction, bIsStream))
{
return {};
}
return adapter;
return pAdapter;
}
}

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOAdapterAsyncStream.hpp
File: AuIOAdapterAsyncStream.hpp
Date: 2022-6-6
Author: Reece
***/

View File

@ -1,52 +1,52 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOAdapterByteBuffer.cpp
File: AuIOAdapterByteBuffer.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOAdapterByteBuffer.hpp"
#include "AuIOAdapterByteBuffer.hpp"
namespace Aurora::IO
{
AUKN_SYM AuSPtr<IStreamReader> NewByteBufferReadAdapter(const AuSPtr<Memory::ByteBuffer> &buffer)
AUKN_SYM AuSPtr<IStreamReader> NewByteBufferReadAdapter(const AuSPtr<Memory::ByteBuffer> &pBuffer)
{
if (!buffer)
if (!pBuffer)
{
SysPushErrorArg();
return {};
}
return AuMakeShared<Buffered::BlobReader>(buffer);
return AuMakeShared<Buffered::BlobReader>(pBuffer);
}
AUKN_SYM AuSPtr<ISeekingReader> NewByteBufferLinearSeekableAdapter(const AuSPtr<Memory::ByteBuffer> &buffer)
AUKN_SYM AuSPtr<ISeekingReader> NewByteBufferLinearSeekableAdapter(const AuSPtr<Memory::ByteBuffer> &pBuffer)
{
if (!buffer)
if (!pBuffer)
{
SysPushErrorArg();
return {};
}
if (buffer->flagCircular)
if (pBuffer->flagCircular)
{
SysPushErrorIO("Seekable buffer must not be circular");
return {};
}
return AuMakeShared<Buffered::BlobSeekableReader>(buffer);
return AuMakeShared<Buffered::BlobSeekableReader>(pBuffer);
}
AUKN_SYM AuSPtr<IStreamWriter> NewByteBufferWriteAdapter(const AuSPtr<Memory::ByteBuffer> &buffer)
AUKN_SYM AuSPtr<IStreamWriter> NewByteBufferWriteAdapter(const AuSPtr<Memory::ByteBuffer> &pBuffer)
{
if (!buffer)
if (!pBuffer)
{
SysPushErrorArg();
return {};
}
return AuMakeShared<Buffered::BlobWriter>(buffer);
return AuMakeShared<Buffered::BlobWriter>(pBuffer);
}
}

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: BufferedProcessor.hpp
File: AuIOAdapterByteBuffer.hpp
Date: 2022-6-6
Author: Reece
***/

View File

@ -1,32 +1,45 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOAdapterCompression.cpp
File: AuIOAdapterCompression.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOAdapterCompression.hpp"
#include "AuIOAdapterCompression.hpp"
namespace Aurora::IO
{
CompressionStreamReader::CompressionStreamReader(const AuSPtr<Compression::ICompressionStream> &compressionStream) : compressionStream(compressionStream)
CompressionStreamReader::CompressionStreamReader(const AuSPtr<Compression::ICompressionStream> &pCompressionStream) :
pCompressionStream(pCompressionStream)
{
}
CompressionSeekingReader::CompressionSeekingReader(const AuSPtr<Compression::ICompressionStream> &pCompressionStream)
: pCompressionStream(pCompressionStream)
{
}
EStreamError CompressionStreamReader::IsOpen()
{
return this->errored_ ? EStreamError::eErrorEndOfStream : EStreamError::eErrorNone;
return this->bErrored_ ? EStreamError::eErrorEndOfStream : EStreamError::eErrorNone;
}
EStreamError CompressionStreamReader::Read(const Memory::MemoryViewStreamWrite &parameters)
{
auto pair = this->compressionStream->ReadEx(parameters, true);
if (!this->pCompressionStream)
{
return EStreamError::eErrorStreamNotOpen;
}
auto pair = this->pCompressionStream->ReadEx(parameters, true);
if (pair == AuStreamReadWrittenPair_t{})
{
this->errored_ = true;
this->bErrored_ = true;
return EStreamError::eErrorEndOfStream;
}
@ -38,25 +51,20 @@ namespace Aurora::IO
{
}
CompressionSeekingReader::CompressionSeekingReader(const AuSPtr<Compression::ICompressionStream> &compressionStream) : compressionStream(compressionStream)
{
}
EStreamError CompressionSeekingReader::IsOpen()
{
return this->errored_ ?
return this->bErrored_ ?
EStreamError::eErrorEndOfStream :
EStreamError::eErrorNone;
}
EStreamError CompressionSeekingReader::ArbitraryRead(AuUInt offset, const Memory::MemoryViewStreamWrite &parameters)
{
if (this->offset != offset)
if (this->uOffset != offset)
{
if (this->offset > offset)
if (this->uOffset > offset)
{
if (!this->compressionStream->GoBackByProcessedN(this->offset - offset))
if (!this->pCompressionStream->GoBackByProcessedN(this->uOffset - offset))
{
SysPushErrorIO("Negative compression seek out of bounds");
return EStreamError::eErrorStreamInterrupted;
@ -64,26 +72,25 @@ namespace Aurora::IO
}
else
{
if (!this->compressionStream->GoForwardByProcessedN(offset - this->offset))
if (!this->pCompressionStream->GoForwardByProcessedN(offset - this->uOffset))
{
SysPushErrorIO("Positive compression seek out of bounds");
return EStreamError::eErrorStreamInterrupted;
}
}
this->offset = offset;
this->uOffset = offset;
}
auto pair = this->compressionStream->ReadEx(parameters, true);
auto pair = this->pCompressionStream->ReadEx(parameters, true);
if (pair == AuStreamReadWrittenPair_t {})
{
this->errored_ = true;
this->bErrored_ = true;
return EStreamError::eErrorEndOfStream;
}
this->offset += pair.second;
this->uOffset += pair.second;
parameters.outVariable = pair.second;
return EStreamError::eErrorNone;
}
@ -91,13 +98,13 @@ namespace Aurora::IO
{
}
AUKN_SYM AuSPtr<IStreamReader> NewCompressionReadAdapter(const AuSPtr<Compression::ICompressionStream> &compresionStream)
AUKN_SYM AuSPtr<IStreamReader> NewCompressionReadAdapter(const AuSPtr<Compression::ICompressionStream> &pCompresionStream)
{
return AuMakeShared<CompressionStreamReader>(compresionStream);
return AuMakeShared<CompressionStreamReader>(pCompresionStream);
}
AUKN_SYM AuSPtr<ISeekingReader> NewCompressionSeekingAdapter(const AuSPtr<Compression::ICompressionStream> &compresionStream)
AUKN_SYM AuSPtr<ISeekingReader> NewCompressionSeekingAdapter(const AuSPtr<Compression::ICompressionStream> &pCompresionStream)
{
return AuMakeShared<CompressionSeekingReader>(compresionStream);
return AuMakeShared<CompressionSeekingReader>(pCompresionStream);
}
}

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOAdapterCompression.hpp
File: AuIOAdapterCompression.hpp
Date: 2022-6-6
Author: Reece
***/
@ -11,7 +11,7 @@ namespace Aurora::IO
{
struct CompressionStreamReader : IStreamReader
{
AuSPtr<Compression::ICompressionStream> compressionStream;
AuSPtr<Compression::ICompressionStream> pCompressionStream;
CompressionStreamReader(const AuSPtr<Compression::ICompressionStream> &compressionStream);
@ -19,12 +19,12 @@ namespace Aurora::IO
EStreamError Read(const Memory::MemoryViewStreamWrite &parameters) override;
void Close() override;
bool errored_ {};
bool bErrored_ {};
};
struct CompressionSeekingReader : ISeekingReader
{
AuSPtr<Compression::ICompressionStream> compressionStream;
AuSPtr<Compression::ICompressionStream> pCompressionStream;
CompressionSeekingReader(const AuSPtr<Compression::ICompressionStream> &compressionStream);
@ -32,7 +32,7 @@ namespace Aurora::IO
EStreamError ArbitraryRead(AuUInt offset, const Memory::MemoryViewStreamWrite &parameters) override;
void Close() override;
bool errored_ {};
AuUInt offset {};
bool bErrored_ {};
AuUInt uOffset {};
};
}

View File

@ -1,46 +1,47 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOAdapterSeeking.cpp
File: AuIOAdapterSeeking.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOAdapterSeeking.hpp"
#include "AuIOAdapterSeeking.hpp"
namespace Aurora::IO
{
SeekingReader::SeekingReader(const AuSPtr<ISeekingReader> &reader) : reader(reader)
SeekingReader::SeekingReader(const AuSPtr<ISeekingReader> &pReader) :
pReader(pReader)
{
}
EStreamError SeekingReader::IsOpen()
{
return this->reader ? this->reader->IsOpen() : EStreamError::eErrorStreamNotOpen;
return this->pReader ? this->pReader->IsOpen() : EStreamError::eErrorStreamNotOpen;
}
EStreamError SeekingReader::Read(const Memory::MemoryViewStreamWrite &parameters)
{
auto error = this->reader ? this->reader->ArbitraryRead(this->index, parameters) : EStreamError::eErrorStreamNotOpen;
auto error = this->pReader ? this->pReader->ArbitraryRead(this->uIndex, parameters) : EStreamError::eErrorStreamNotOpen;
if (error == EStreamError::eErrorNone)
{
this->index += parameters.outVariable;
this->uIndex += parameters.outVariable;
}
return error;
}
void SeekingReader::Close()
{
if (this->reader)
if (this->pReader)
{
this->reader->Close();
this->pReader->Close();
}
}
AUKN_SYM AuSPtr<IStreamReader> NewSeekingReadAdapter(const AuSPtr<ISeekingReader> &reader)
AUKN_SYM AuSPtr<IStreamReader> NewSeekingReadAdapter(const AuSPtr<ISeekingReader> &pReader)
{
return AuMakeShared<SeekingReader>(reader);
return AuMakeShared<SeekingReader>(pReader);
}
}

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOAdapterSeeking.hpp
File: AuIOAdapterSeeking.hpp
Date: 2022-6-6
Author: Reece
***/
@ -11,13 +11,13 @@ namespace Aurora::IO
{
struct SeekingReader : IStreamReader
{
AuSPtr<ISeekingReader> reader;
AuUInt index {};
SeekingReader(const AuSPtr<ISeekingReader> &reader);
SeekingReader(const AuSPtr<ISeekingReader> &pReader);
virtual EStreamError IsOpen() override;
virtual EStreamError Read(const Memory::MemoryViewStreamWrite &parameters) override;
virtual void Close() override;
AuSPtr<ISeekingReader> pReader;
AuUInt uIndex {};
};
}

View File

@ -1,13 +1,13 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOBufferedProcessor.cpp
File: AuIOBufferedProcessor.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOBufferedProcessor.hpp"
#include "AuIOBufferedProcessor.hpp"
namespace Aurora::IO
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOAdapterByteBuffer.hpp
File: AuBufferedProcessor.hpp
Date: 2022-6-6
Author: Reece
***/

View File

@ -1,14 +1,14 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOPipeProcessor.cpp
File: AuIOPipeProcessor.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOProcessor.hpp"
#include "IOPipeProcessor.hpp"
#include "AuIOProcessor.hpp"
#include "AuIOPipeProcessor.hpp"
#include <Aurora/IO/Protocol/Protocol.hpp>
namespace Aurora::IO

View File

@ -1,16 +1,16 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOProcessor.cpp
File: AuIOProcessor.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOProcessorItem.hpp"
#include "IOProcessorItems.hpp"
#include "IOProcessor.hpp"
#include "IOPipeProcessor.hpp"
#include "AuIOProcessorItem.hpp"
#include "AuIOProcessorItems.hpp"
#include "AuIOProcessor.hpp"
#include "AuIOPipeProcessor.hpp"
#include "Loop/Loop.hpp"
#include "Loop/LoopQueue.hpp"

View File

@ -7,9 +7,9 @@
***/
#pragma once
#include "IOPipeProcessor.hpp"
#include "IOProcessorItems.hpp"
#include "IOProcessorTimers.hpp"
#include "AuIOPipeProcessor.hpp"
#include "AuIOProcessorItems.hpp"
#include "AuIOProcessorTimers.hpp"
namespace Aurora::IO
{

View File

@ -1,14 +1,14 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOProcessorItem.cpp
File: AuIOProcessorItem.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOProcessorItem.hpp"
#include "IOProcessor.hpp"
#include "AuIOProcessorItem.hpp"
#include "AuIOProcessor.hpp"
namespace Aurora::IO
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOProcessorItem.hpp
File: AuIOProcessorItem.hpp
Date: 2022-6-6
Author: Reece
***/

View File

@ -7,9 +7,9 @@
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOProcessorItem.hpp"
#include "IOProcessorItems.hpp"
#include "IOProcessor.hpp"
#include "AuIOProcessorItem.hpp"
#include "AuIOProcessorItems.hpp"
#include "AuIOProcessor.hpp"
namespace Aurora::IO
{

View File

@ -1,14 +1,14 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOProcessorTimers.cpp
File: AuIOProcessorTimers.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOProcessorTimers.hpp"
#include "IOProcessor.hpp"
#include "AuIOProcessorTimers.hpp"
#include "AuIOProcessor.hpp"
namespace Aurora::IO
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOProcessorTimers.hpp
File: AuIOProcessorTimers.hpp
Date: 2022-6-6
Author: Reece
***/

View File

@ -1,13 +1,13 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOSimpleEventListener.cpp
File: AuIOSimpleEventListener.cpp
Date: 2022-6-22
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOSimpleEventListener.hpp"
#include "AuIOSimpleEventListener.hpp"
namespace Aurora::IO
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOSimpleEventListener.hpp
File: AuIOSimpleEventListener.hpp
Date: 2022-6-22
Author: Reece
***/

View File

@ -1,13 +1,13 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOSleep.Linux.cpp
File: AuIOSleep.Linux.cpp
Date: 2022-5-13
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "IO.hpp"
#include "IOSleep.Linux.hpp"
#include "AuIOSleep.Linux.hpp"
#include "UNIX/IOSubmit.Linux.hpp"
namespace Aurora::IO

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOSleep.Linux.hpp
File: AuIOSleep.Linux.hpp
Date: 2022-5-13
Author: Reece
***/

View File

@ -1,14 +1,14 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOSleep.NT.hpp
File: AuIOSleep.NT.hpp
Date: 2022-5-13
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "IO.hpp"
#include "IOSleep.NT.hpp"
#include "AuIOSleep.NT.hpp"
namespace Aurora::IO
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOSleep.NT.hpp
File: AuIOSleep.NT.hpp
Date: 2022-5-13
Author: Reece
***/

23
Source/IO/AuIOSleep.cpp Normal file
View File

@ -0,0 +1,23 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuIOSleep.cpp
Date: 2022-8-5
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "IO.hpp"
#include "AuIOSleep.hpp"
namespace Aurora::IO
{
AUKN_SYM bool IOSleep(AuUInt32 dwMilliseconds)
{
return WaitFor(dwMilliseconds, true);
}
AUKN_SYM bool IOYieldFor(AuUInt32 dwMilliseconds)
{
return WaitFor(dwMilliseconds, false);
}
}

2
Source/IO/IOSleep.hpp → Source/IO/AuIOSleep.hpp Executable file → Normal file
View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOSleep.hpp
File: AuIOSleep.hpp
Date: 2022-8-5
Author: Reece
***/

View File

@ -1,22 +1,24 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOWaitableIOLoopSource.cpp
File: AuIOWaitableIOLoopSource.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOWaitableIOLoopSource.hpp"
#include "AuIOWaitableIOLoopSource.hpp"
namespace Aurora::IO
{
IOWatachableIOLoopSource::IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource> &source) : source(source)
IOWatachableIOLoopSource::IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource> &pSource) :
pSource(pSource)
{
}
IOWatachableIOLoopSource::IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>& source, AuUInt32 ioTimeoutMS) : source(source), ioTimeoutMS(ioTimeoutMS)
IOWatachableIOLoopSource::IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>&pSource, AuUInt32 dwIoTimeoutMS) :
pSource(pSource), dwIoTimeoutMS(dwIoTimeoutMS)
{
}
@ -58,12 +60,12 @@ namespace Aurora::IO
AuSPtr<Loop::ILoopSource> IOWatachableIOLoopSource::GetLoopSource()
{
return this->source;
return this->pSource;
}
AuSPtr<Loop::ILoopSource> IOWatachableIOLoopSource::SetLoopSource(const AuSPtr<Loop::ILoopSource> &ls)
AuSPtr<Loop::ILoopSource> IOWatachableIOLoopSource::SetLoopSource(const AuSPtr<Loop::ILoopSource> &pSource)
{
return AuExchange(this->source, ls);
return AuExchange(this->pSource, pSource);
}
bool IOWatachableIOLoopSource::IsRunOnSelfIOCheckedOnTimerTick()
@ -73,16 +75,16 @@ namespace Aurora::IO
AuUInt32 IOWatachableIOLoopSource::IOTimeoutInMS()
{
return this->ioTimeoutMS;
return this->dwIoTimeoutMS;
}
AUKN_SYM AuSPtr<IIOWatachableIOLoopSource> NewWaitableLoopSource(const AuSPtr<Loop::ILoopSource>& ptr)
AUKN_SYM AuSPtr<IIOWatachableIOLoopSource> NewWaitableLoopSource(const AuSPtr<Loop::ILoopSource>&pSource)
{
return AuMakeShared<IOWatachableIOLoopSource>(ptr);
return AuMakeShared<IOWatachableIOLoopSource>(pSource);
}
AUKN_SYM AuSPtr<IIOWatachableIOLoopSource> NewWaitableLoopSourceEx(const AuSPtr<Loop::ILoopSource>& ptr, AuUInt32 msTimeout)
AUKN_SYM AuSPtr<IIOWatachableIOLoopSource> NewWaitableLoopSourceEx(const AuSPtr<Loop::ILoopSource>&pSource, AuUInt32 dwIoTimeoutMS)
{
return AuMakeShared<IOWatachableIOLoopSource>(ptr, msTimeout);
return AuMakeShared<IOWatachableIOLoopSource>(pSource, dwIoTimeoutMS);
}
}

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOWaitableIOLoopSource.hpp
File: AuIOWaitableIOLoopSource.hpp
Date: 2022-6-6
Author: Reece
***/
@ -11,8 +11,8 @@ namespace Aurora::IO
{
struct IOWatachableIOLoopSource : IIOWatachableIOLoopSource
{
IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>& source);
IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>& source, AuUInt32 ioTimeoutMS);
IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>&pSource);
IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>&pSource, AuUInt32 ioTimeoutMS);
bool IsRunOnOtherTick() override;
bool IsRunOnTick() override;
@ -27,10 +27,10 @@ namespace Aurora::IO
AuUInt32 IOTimeoutInMS() override;
AuSPtr<Loop::ILoopSource> GetLoopSource() override;
AuSPtr<Loop::ILoopSource> SetLoopSource(const AuSPtr<Loop::ILoopSource> &ls) override;
AuSPtr<Loop::ILoopSource> SetLoopSource(const AuSPtr<Loop::ILoopSource> &pSource) override;
bool IsRunOnSelfIOCheckedOnTimerTick() override;
AuSPtr<Loop::ILoopSource> source;
AuUInt32 ioTimeoutMS{};
AuSPtr<Loop::ILoopSource> pSource;
AuUInt32 dwIoTimeoutMS{};
};
}

View File

@ -1,13 +1,13 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOWaitableIOTimer.cpp
File: AuIOWaitableIOTimer.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOWaitableIOTimer.hpp"
#include "AuIOWaitableIOTimer.hpp"
namespace Aurora::IO
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOWaitableIOTimer.hpp
File: AuIOWaitableIOTimer.hpp
Date: 2022-6-6
Author: Reece
***/

View File

@ -1,23 +0,0 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOSleep.cpp
Date: 2022-8-5
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "IO.hpp"
#include "IOSleep.hpp"
namespace Aurora::IO
{
AUKN_SYM bool IOSleep(AuUInt32 milliseconds)
{
return WaitFor(milliseconds, true);
}
AUKN_SYM bool IOYieldFor(AuUInt32 milliseconds)
{
return WaitFor(milliseconds, false);
}
}

View File

@ -13,7 +13,8 @@ namespace Aurora::IO::Net
{
DatagramServerImpl(struct NetInterface *pInterface,
struct NetWorker *pWorker,
const AuSPtr<IDatagramDriver> &pDriver);
const AuSPtr<IDatagramDriver> &pDriver,
AuUInt32 uDefaultPacketSize);
void DoPosixTick() override;
};

View File

@ -13,7 +13,7 @@
#else
#include "AuNetStream.Linux.hpp"
#endif
#include <Source/IO/IOPipeProcessor.hpp>
#include <Source/IO/AuIOPipeProcessor.hpp>
#include "AuNetWorker.hpp"
#include <Source/IO/Protocol/Protocol.hpp>
#include <Source/IO/Protocol/AuProtocolStack.hpp>

View File

@ -10,7 +10,7 @@
#include "AuNetSocketChannelInput.hpp"
#include "AuNetWorker.hpp"
#include "AuNetSocketChannel.hpp"
#include <Source/IO/IOPipeProcessor.hpp>
#include <Source/IO/AuIOPipeProcessor.hpp>
namespace Aurora::IO::Net
{

View File

@ -9,7 +9,7 @@
#include "AuNetSocket.hpp"
#include "AuNetSocketChannelOutput.hpp"
#include "AuNetWorker.hpp"
#include <Source/IO/IOPipeProcessor.hpp>
#include <Source/IO/AuIOPipeProcessor.hpp>
#if defined(AURORA_IS_MODERNNT_DERIVED)
#include "AuNetStream.NT.hpp"

View File

@ -16,7 +16,8 @@ namespace Aurora::IO::Net
NetWorker *pWorker,
const AuSPtr<ISocketServerDriver> &pDriver,
const AuSPtr<ISocketDriverFactory> &pSocketDriverFactory,
AuUInt32 maxConnections,
AuUInt32 uMaxConnections,
AuUInt32 uDefaultInputStreamSize,
bool bMultiThreaded) :
SocketServer(pInterface,
pWorker,

View File

@ -9,6 +9,7 @@
#include "AuNetStream.NT.hpp"
#include "AuNetSocket.hpp"
#include "AuNetWorker.hpp"
#include "AuNetEndpoint.hpp"
#include <Source/IO/Loop/LSEvent.hpp>
namespace Aurora::IO::Net

View File

@ -9,7 +9,7 @@
#include "AuProtocolStack.hpp"
#include "AuProtocolPiece.hpp"
#include "IProtocolNext.hpp"
#include <Source/IO/IOPipeProcessor.hpp>
#include <Source/IO/AuIOPipeProcessor.hpp>
namespace Aurora::IO::Protocol
{

View File

@ -33,9 +33,9 @@ namespace Aurora::Logging
return Sinks::NewStdSinkNew();
}
AUKN_SYM void NewStdSinkRelease(IFormattedSink *sink)
AUKN_SYM void NewStdSinkRelease(IFormattedSink *pSink)
{
Sinks::NewStdSinkRelease(sink);
Sinks::NewStdSinkRelease(pSink);
}
AUKN_SYM IBasicSink *NewOSEventDirectorySinkNew()
@ -43,7 +43,7 @@ namespace Aurora::Logging
return {};
}
AUKN_SYM void NewOSEventDirectorySinkRelease(IBasicSink *sink)
AUKN_SYM void NewOSEventDirectorySinkRelease(IBasicSink *pSink)
{}
@ -55,10 +55,10 @@ namespace Aurora::Logging
return {};
}
AUKN_SYM void NewDebugLoggerRelease(IBasicSink *sink)
AUKN_SYM void NewDebugLoggerRelease(IBasicSink *pSink)
{
#if defined(AURORA_IS_MODERNNT_DERIVED)
return Sinks::NewDebugLoggerRelease(sink);
return Sinks::NewDebugLoggerRelease(pSink);
#endif
}
@ -70,32 +70,32 @@ namespace Aurora::Logging
return {};
}
AUKN_SYM void NewOSNamedEventDirectorySinkRelease(IBasicSink *sink)
AUKN_SYM void NewOSNamedEventDirectorySinkRelease(IBasicSink *pSink)
{
#if defined(AURORA_PLATFORM_WIN32) || defined(AURORA_IS_POSIX_DERIVED)
Sinks::NewOSNamedEventDirectorySinkRelease(sink);
Sinks::NewOSNamedEventDirectorySinkRelease(pSink);
#endif
}
AUKN_SYM IBasicSink *NewDirectorySinkNew(const AuString &path, DirectoryLogger dirInfo, bool binary)
AUKN_SYM IBasicSink *NewDirectorySinkNew(const AuString &path, DirectoryLogger dirInfo, bool bBinary)
{
return Sinks::NewDirectoryLoggerNew(path, dirInfo, binary);
return Sinks::NewDirectoryLoggerNew(path, dirInfo, bBinary);
}
AUKN_SYM void NewDirectorySinkRelease(IBasicSink *sink)
AUKN_SYM void NewDirectorySinkRelease(IBasicSink *pSink)
{
Sinks::NewDirectoryLoggerRelease(sink);
Sinks::NewDirectoryLoggerRelease(pSink);
}
AUKN_SYM IFormattedSink *NewFileSinkNew(const AuString &path, bool binary)
AUKN_SYM IFormattedSink *NewFileSinkNew(const AuString &path, bool bBinary)
{
return Sinks::NewFileSinkNew(path, binary);
return Sinks::NewFileSinkNew(path, bBinary);
}
AUKN_SYM void NewFileSinkRelease(IFormattedSink *sink)
AUKN_SYM void NewFileSinkRelease(IFormattedSink *pSink)
{
Sinks::NewFileSinkRelease(sink);
Sinks::NewFileSinkRelease(pSink);
}
AUKN_SYM IIPCLogger *NewIPCSinkNew(const AuString &path, bool lengthPrefixed)
@ -103,9 +103,9 @@ namespace Aurora::Logging
return Sinks::NewIPCSinkNew(path, lengthPrefixed);
}
AUKN_SYM void NewIPCSinkRelease(IIPCLogger *sink)
AUKN_SYM void NewIPCSinkRelease(IIPCLogger *pSink)
{
Sinks::NewIPCSinkRelease(sink);
Sinks::NewIPCSinkRelease(pSink);
}
AUKN_SYM IBasicSinkRB *NewRingLoggerNew(AuUInt32 maxLogEntries)
@ -113,8 +113,8 @@ namespace Aurora::Logging
return Sinks::NewRingBufferNew(maxLogEntries);
}
AUKN_SYM void NewRingLoggerRelease(IBasicSinkRB *sink)
AUKN_SYM void NewRingLoggerRelease(IBasicSinkRB *pSink)
{
Sinks::NewRingBufferRelease(sink);
Sinks::NewRingBufferRelease(pSink);
}
}

View File

@ -33,15 +33,15 @@ namespace Aurora::Logging
Disable();
}
void Logger::WriteLines(AuUInt8 level, const ConsoleMessage &msg)
void Logger::WriteLines(AuUInt8 uLevel, const ConsoleMessage &msg)
{
try
{
if (msg.line.find('\n') == AuString::npos) [[likely]]
{
if (WriteNow(level, msg))
if (WriteNow(uLevel, msg))
{
AddToPushQueue(level, msg);
AddToPushQueue(uLevel, msg);
}
}
@ -53,9 +53,9 @@ namespace Aurora::Logging
ConsoleMessage dup = msg;
dup.line = line;
if (WriteNow(level, dup))
if (WriteNow(uLevel, dup))
{
AddToPushQueue(level, dup);
AddToPushQueue(uLevel, dup);
}
});
}
@ -67,23 +67,23 @@ namespace Aurora::Logging
}
}
void Logger::WriteMessage(AuUInt8 level, const ConsoleMessage &msg)
void Logger::WriteMessage(AuUInt8 uLevel, const ConsoleMessage &msg)
{
// Accounts for atomic shutdown
{
AU_LOCK_GUARD(spin);
if (shouldFilter[level])
if (shouldFilter[uLevel])
{
return;
}
}
WriteLines(level, msg);
WriteLines(uLevel, msg);
}
void Logger::AddToPushQueue(AuUInt8 level, const ConsoleMessage &msg)
void Logger::AddToPushQueue(AuUInt8 uLevel, const ConsoleMessage &msg)
{
{
AU_LOCK_GUARD(gTaskSpin);
@ -94,7 +94,7 @@ namespace Aurora::Logging
gLogTasks.reserve(nice*10);
}
while (!AuTryInsert(gLogTasks, AuMakeTuple(this, level, msg)))
while (!AuTryInsert(gLogTasks, AuMakeTuple(this, uLevel, msg)))
{
SysPushErrorMem("Push failed - trying again");
spin.Unlock();
@ -106,13 +106,13 @@ namespace Aurora::Logging
Grug::DrachenlordScreech();
}
void Logger::PushFilter(AuUInt8 level, bool shouldFilter)
void Logger::PushFilter(AuUInt8 uLevel, bool bShouldFilter)
{
AU_LOCK_GUARD(spin);
try
{
while (!AuTryInsert(filters, AuMakeTuple(level, shouldFilter)))
while (!AuTryInsert(filters, AuMakeTuple(uLevel, shouldFilter)))
{
SysPushErrorMem("Push failed - trying again. wont be able to handle pop - wont syspanic yet");
AuThreading::Sleep(100);
@ -122,9 +122,9 @@ namespace Aurora::Logging
for (auto &tuple : filters)
{
auto level = AuGet<0>(tuple);
auto uLevel = AuGet<0>(tuple);
auto shouldFilter = AuGet<1>(tuple);
this->shouldFilter[level] = shouldFilter;
this->shouldFilter[uLevel] = shouldFilter;
}
}
catch (...)
@ -173,10 +173,10 @@ namespace Aurora::Logging
for (const auto &logEntry : logTasks)
{
auto &logger = AuGet<0>(logEntry);
auto &level = AuGet<1>(logEntry);
auto &uLevel = AuGet<1>(logEntry);
auto &message = AuGet<2>(logEntry);
logger->WriteLater(level, message);
logger->WriteLater(uLevel, message);
}
}
catch (...)
@ -218,10 +218,10 @@ namespace Aurora::Logging
for (const auto &logEntry : logTasks)
{
auto &logger = AuGet<0>(logEntry);
auto &level = AuGet<1>(logEntry);
auto &uLevel = AuGet<1>(logEntry);
auto &message = AuGet<2>(logEntry);
logger->WriteLater(level, message);
logger->WriteLater(uLevel, message);
}
}
catch (...)
@ -282,7 +282,7 @@ namespace Aurora::Logging
}
}
bool Logger::WriteNow(AuUInt8 level, const ConsoleMessage &msg)
bool Logger::WriteNow(AuUInt8 uLevel, const ConsoleMessage &msg)
{
bool ret {};
try
@ -296,7 +296,7 @@ namespace Aurora::Logging
try
{
ret |= sink->OnMessageNonblocking(level, msg);
ret |= sink->OnMessageNonblocking(uLevel, msg);
}
catch (...)
{
@ -312,7 +312,7 @@ namespace Aurora::Logging
return ret;
}
void Logger::WriteLater(AuUInt8 level, const ConsoleMessage &msg)
void Logger::WriteLater(AuUInt8 uLevel, const ConsoleMessage &msg)
{
try
{
@ -325,7 +325,7 @@ namespace Aurora::Logging
try
{
sink->OnMessageBlocking(level, msg);
sink->OnMessageBlocking(uLevel, msg);
}
catch (...)
{

View File

@ -12,29 +12,29 @@
namespace Aurora::Logging
{
AUKN_SYM void WriteLine(AuUInt8 level, const Console::ConsoleMessage &msg)
AUKN_SYM void WriteLine(AuUInt8 uLevel, const Console::ConsoleMessage &msg)
{
Console::Hooks::WriteLine(msg);
if (gUserLogger)
{
gUserLogger->WriteMessage(level, msg);
gUserLogger->WriteMessage(uLevel, msg);
}
else if (!Console::gDefaultLogger)
{
auto tmp = Console::CreateDefaultLogger();
if (tmp)
{
tmp->WriteMessage(level, msg);
tmp->WriteMessage(uLevel, msg);
}
}
else
{
Console::gDefaultLogger->WriteMessage(level, msg);
Console::gDefaultLogger->WriteMessage(uLevel, msg);
}
}
AUKN_SYM void SetGlobalLogger(const AuSPtr<Logging::ILogger> &defaultGlobalLogger)
AUKN_SYM void SetGlobalLogger(const AuSPtr<Logging::ILogger> &pDefaultGlobalLogger)
{
gUserLogger = defaultGlobalLogger;
gUserLogger = pDefaultGlobalLogger;
}
}

View File

@ -1,12 +1,12 @@
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Paths.cpp
File: AuPaths.cpp
Date: 2021-7-14
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "Paths.hpp"
#include "AuPaths.hpp"
#if defined(AURORA_IS_POSIX_DERIVED)
#include <stdlib.h>

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Paths.hpp
File: AuPaths.hpp
Date: 2021-6-12
Author: Reece
***/

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Process.cpp
File: AuProcess.cpp
Date: 2021-8-20
Author: Reece
***/
@ -23,13 +23,13 @@
#endif
#if defined(AURORA_IS_MODERNNT_DERIVED)
#include "ProcessSectionView.NT.hpp"
#include "AuProcessSectionView.NT.hpp"
#endif
#include <Source/IO/FS/FS.hpp>
#include <Source/IO/FS/Resources.hpp>
#include "ProcessMap.hpp"
#include "AuProcessMap.hpp"
namespace Aurora::Process
{

View File

@ -6,8 +6,8 @@
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessMap.Linux.hpp"
#include "ProcessMap.hpp"
#include "AuProcessMap.Linux.hpp"
#include "AuProcessMap.hpp"
#include <link.h>
#if defined(AURORA_IS_64BIT)

View File

@ -6,8 +6,8 @@
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessMap.NT.hpp"
#include "ProcessMap.hpp"
#include "AuProcessMap.NT.hpp"
#include "AuProcessMap.hpp"
namespace Aurora::Process
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: UtilProcessMap.NT.hpp
File: AuProcessMap.NT.hpp
Date: 2022-1-24
Author: Reece
***/

View File

@ -1,13 +1,13 @@
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessMap.Win32.cpp
File: AuProcessMap.Win32.cpp
Date: 2021-6-12
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessMap.Win32.hpp"
#include "ProcessMap.NT.hpp"
#include "AuProcessMap.Win32.hpp"
#include "AuProcessMap.NT.hpp"
#include <tlhelp32.h>
namespace Aurora::Process

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessMap.Win32.hpp
File: AuProcessMap.Win32.hpp
Date: 2021-6-12
Author: Reece
***/

View File

@ -1,23 +1,23 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessMap.cpp
File: AuProcessMap.cpp
Date: 2022-1-23
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessMap.hpp"
#include "AuProcessMap.hpp"
#if defined(AURORA_PLATFORM_WIN32)
#include "ProcessMap.Win32.hpp"
#include "AuProcessMap.Win32.hpp"
#endif
#if defined(AURORA_IS_MODERNNT_DERIVED)
#include "ProcessMap.NT.hpp"
#include "AuProcessMap.NT.hpp"
#endif
#if defined(AURORA_IS_LINUX_DERIVED)
#include "ProcessMap.Linux.hpp"
#include "AuProcessMap.Linux.hpp"
#endif
namespace Aurora::Process

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessMap.hpp
File: AuProcessMap.hpp
Date: 2022-1-23
Author: Reece
***/

View File

@ -1,12 +1,12 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionAllocations.cpp
File: AuProcessSectionAllocations.cpp
Date: 2022-09-30
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessSectionAllocations.hpp"
#include "AuProcessSectionAllocations.hpp"
namespace Aurora::Process
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionAllocations.hpp
File: AuProcessSectionAllocations.hpp
Date: 2022-09-30
Author: Reece
***/

View File

@ -6,9 +6,9 @@
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessSectionFileMapView.NT.hpp"
#include "ProcessSectionViewReserved.NT.hpp"
#include "ProcessSectionView.NT.hpp"
#include "AuProcessSectionFileMapView.NT.hpp"
#include "AuProcessSectionViewReserved.NT.hpp"
#include "AuProcessSectionView.NT.hpp"
namespace Aurora::Process
{

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionFileMapView.NT.hpp
File: AuProcessSectionFileMapView.NT.hpp
Date: 2022-08-09
Author: Reece
***/

View File

@ -1,14 +1,14 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionFileMapView.Unix.cpp
File: AuProcessSectionFileMapView.Unix.cpp
Date: 2022-08-09
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessSectionFileMapView.Unix.hpp"
#include "ProcessSectionViewReserved.Unix.hpp"
#include "ProcessSectionView.Unix.hpp"
#include "AuProcessSectionFileMapView.Unix.hpp"
#include "AuProcessSectionViewReserved.Unix.hpp"
#include "AuProcessSectionView.Unix.hpp"
#include <sys/mman.h>
namespace Aurora::Process

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionFileMapView.Unix.hpp
File: AuProcessSectionFileMapView.Unix.hpp
Date: 2022-08-09
Author: Reece
***/

View File

@ -1,20 +1,30 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionView.NT.cpp
File: AuProcessSectionView.NT.cpp
Date: 2022-08-09
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessSectionView.NT.hpp"
#include "AuProcessSectionView.NT.hpp"
#include "Process.hpp"
#include <Source/IO/FS/FileStream.NT.hpp>
#include "ProcessSectionFileMapView.NT.hpp"
#include "AuProcessSectionFileMapView.NT.hpp"
#include <Source/IO/IPC/AuIPCHandle.hpp>
#include <Windows.h>
namespace Aurora::Process
{
AuUInt ProcessSectionView::GetStart()
{
return AuNumericLimits<AuUInt>::min();
}
AuUInt ProcessSectionView::GetEnd()
{
return AuNumericLimits<AuUInt>::max();
}
AuSPtr<IProcessSectionMapView> ProcessSectionView::Allocate(AuUInt uLength)
{
PageTable table {};

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionView.NT.hpp
File: AuProcessSectionView.NT.hpp
Date: 2022-08-09
Author: Reece
***/
@ -15,6 +15,10 @@ namespace Aurora::Process
AuThreadPrimitives::SpinLock spinlock;
AuList<AuPair<AuUInt, AuUInt>> allocations;
AuUInt GetStart() override;
AuUInt GetEnd() override;
AuSPtr<IProcessSectionMapView> Allocate(AuUInt uLength) override;
AuSPtr<IProcessSectionMapView> MapFileByPath(const AuString &str,

View File

@ -1,15 +1,15 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionView.Unix.hpp
File: AuProcessSectionView.Unix.hpp
Date: 2022-08-10
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessSectionView.Unix.hpp"
#include "AuProcessSectionView.Unix.hpp"
#include "Process.hpp"
#include <Source/IO/FS/FileStream.Unix.hpp>
#include "ProcessSectionFileMapView.Unix.hpp"
#include "AuProcessSectionFileMapView.Unix.hpp"
#include <Source/IO/IPC/AuIPCHandle.hpp>
#include <Source/IO/IPC/AuIPCMemory.Unix.hpp>
#include <sys/mman.h>
@ -18,6 +18,16 @@
namespace Aurora::Process
{
AuUInt ProcessSectionView::GetStart()
{
return AuNumericLimits<AuUInt>::min();
}
AuUInt ProcessSectionView::GetEnd()
{
return AuNumericLimits<AuUInt>::max();
}
AuSPtr<IProcessSectionMapView> ProcessSectionView::Allocate(AuUInt uLength)
{
if (!uLength)

View File

@ -11,6 +11,10 @@ namespace Aurora::Process
{
struct ProcessSectionView : IProcessSectionView, AuEnableSharedFromThis<ProcessSectionView>
{
AuUInt GetStart() override;
AuUInt GetEnd() override;
AuSPtr<IProcessSectionMapView> Allocate(AuUInt length) override;
AuSPtr<IProcessSectionMapView> MapFileByPath(const AuString &str,

View File

@ -1,16 +1,16 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionViewReserved.NT.cpp
File: AuProcessSectionViewReserved.NT.cpp
Date: 2022-9-30
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessSectionViewReserved.NT.hpp"
#include "AuProcessSectionViewReserved.NT.hpp"
#include "Process.hpp"
#include <Source/IO/FS/FileStream.NT.hpp>
#include "ProcessSectionFileMapView.NT.hpp"
#include "ProcessSectionView.NT.hpp"
#include "AuProcessSectionFileMapView.NT.hpp"
#include "AuProcessSectionView.NT.hpp"
#include <Source/IO/IPC/AuIPCHandle.hpp>
#include <Windows.h>
@ -44,6 +44,16 @@ namespace Aurora::Process
ULONG UnmapFlags
);
AuUInt ProcessSectionViewReserved::GetStart()
{
return (AuUInt)this->pBaseAddress;
}
AuUInt ProcessSectionViewReserved::GetEnd()
{
return this->GetStart() + this->uMaxLength;
}
bool ProcessSectionViewReserved::Init(AuUInt uLength)
{
this->uMaxLength = uLength;

View File

@ -1,13 +1,13 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionViewReserved.NT.hpp
File: AuProcessSectionViewReserved.NT.hpp
Date: 2022-09-30
Author: Reece
***/
#pragma once
#include "ProcessSectionAllocations.hpp"
#include "AuProcessSectionAllocations.hpp"
namespace Aurora::Process
{
@ -20,6 +20,10 @@ namespace Aurora::Process
bool AllocateAddress(AuUInt uOffset, AuUInt uLength, AuUInt &uAddressOut);
bool ReleaseAndCoaleceAddress(AuUInt uOffset, AuUInt uLength);
AuUInt GetStart() override;
AuUInt GetEnd() override;
AuSPtr<IProcessSectionMapView> Allocate(AuUInt uLength) override;
AuSPtr<IProcessSectionMapView> MapFileByPath(const AuString &str,

View File

@ -1,15 +1,15 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionViewReserved.Unix.cpp
File: AuProcessSectionViewReserved.Unix.cpp
Date: 2022-11-15
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "ProcessSectionViewReserved.Unix.hpp"
#include "AuProcessSectionViewReserved.Unix.hpp"
#include "Process.hpp"
#include <Source/IO/FS/FileStream.Unix.hpp>
#include "ProcessSectionFileMapView.Unix.hpp"
#include "AuProcessSectionFileMapView.Unix.hpp"
#include <Source/IO/IPC/AuIPCHandle.hpp>
#include <Source/IO/IPC/AuIPCMemory.Unix.hpp>
#include <sys/mman.h>
@ -26,6 +26,16 @@ namespace Aurora::Process
}
}
AuUInt ProcessSectionViewReserved::GetStart()
{
return (AuUInt)this->pBaseAddress;
}
AuUInt ProcessSectionViewReserved::GetEnd()
{
return this->GetStart() + this->uMaxLength;
}
bool ProcessSectionViewReserved::Init(AuUInt uLength)
{
this->uMaxLength = uLength;

View File

@ -1,13 +1,13 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessSectionViewReserved.Unix.hpp
File: AuProcessSectionViewReserved.Unix.hpp
Date: 2022-11-15
Author: Reece
***/
#pragma once
#include "ProcessSectionAllocations.hpp"
#include "AuProcessSectionAllocations.hpp"
namespace Aurora::Process
{
@ -18,6 +18,10 @@ namespace Aurora::Process
char *pBaseAddress {};
AuUInt GetStart() override;
AuUInt GetEnd() override;
AuSPtr<IProcessSectionMapView> Allocate(AuUInt length) override;
AuSPtr<IProcessSectionMapView> MapFileByPath(const AuString &str,

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Clock.cpp
File: AuClock.cpp
Date: 2021-6-13
Author: Reece
Note: Screw it, std::chrono has been widly shilled at C++11s answer to all these painful macros, asm linkage, and all the other bullshit that pulling clock counters entails.
@ -16,7 +16,7 @@
I'll wave the white flag and use the STL in here for.now
***/
#include <Source/RuntimeInternal.hpp>
#include "Clock.hpp"
#include "AuClock.hpp"
#if defined(AURORA_IS_MODERNNT_DERIVED)

View File

@ -1,7 +1,7 @@
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Clock.hpp
File: AuClock.hpp
Date: 2021-6-13
Author: Reece
***/