[*] Minor include header improvements

This commit is contained in:
Reece Wilson 2023-09-22 00:46:51 +01:00
parent 994fcb5010
commit 7739652ad3
2 changed files with 26 additions and 1 deletions

View File

@ -43,6 +43,31 @@ namespace Aurora::IO::Protocol
struct ProtocolStackDescription struct ProtocolStackDescription
{ {
inline ProtocolStackDescription(AuUInt uBufferedStreamLength = 128 * 1024) :
type(EProtocolStackCreateType::eByBuffered),
byBuffered({ uBufferedStreamLength })
{
}
inline ProtocolStackDescription(const AuSPtr<IIOPipeWork> &pWork,
bool bAutoTick = true,
bool bKillPipeOnFirstRootLevelFalse = true) :
type(EProtocolStackCreateType::eByPipe),
byPipe({ pWork, bAutoTick, bKillPipeOnFirstRootLevelFalse })
{
}
inline ProtocolStackDescription(AuSPtr<IStreamReader> pStreamReader,
AuUInt uPreferredFragmentSize = 0,
AuUInt uBufferedStreamLength = 128 * 1024) :
type(EProtocolStackCreateType::eByBufferedAdhocStream),
byBufferedStream({ uBufferedStreamLength, pStreamReader, uPreferredFragmentSize })
{
}
EProtocolStackCreateType type; EProtocolStackCreateType type;
ProtocolStackByPipe byPipe; ProtocolStackByPipe byPipe;
ProtocolStackByBuffered byBuffered; ProtocolStackByBuffered byBuffered;

View File

@ -317,8 +317,8 @@ namespace __audetail
void InitOnceABI::_FinishFailed() void InitOnceABI::_FinishFailed()
{ {
AuAtomicUnset(&this->uToken_, 0);
AuAtomicSet(&this->uToken_, 2); AuAtomicSet(&this->uToken_, 2);
AuAtomicUnset(&this->uToken_, 0);
InitOnceABI::_Wakeup(); InitOnceABI::_Wakeup();
} }