[*] Shared user data between ICompletionGroupWorkHandle and IAsyncTransaction
This commit is contained in:
parent
493f449d1d
commit
2a555626bb
@ -14,5 +14,7 @@ namespace Aurora::IO::CompletionGroup
|
|||||||
// pls gimme a vtable of a single purecall stub
|
// pls gimme a vtable of a single purecall stub
|
||||||
inline virtual ~ICompletionGroupWorkHandle()
|
inline virtual ~ICompletionGroupWorkHandle()
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
|
AURT_ADD_USR_DATA;
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -21,5 +21,7 @@ namespace Aurora::IO::FS
|
|||||||
virtual bool BlockingTruncate(AuUInt64 length) = 0;
|
virtual bool BlockingTruncate(AuUInt64 length) = 0;
|
||||||
virtual bool BlockingRead(AuUInt64 offset, const Memory::MemoryViewStreamWrite ¶meters) = 0;
|
virtual bool BlockingRead(AuUInt64 offset, const Memory::MemoryViewStreamWrite ¶meters) = 0;
|
||||||
virtual bool BlockingWrite(AuUInt64 offset, const Memory::MemoryViewStreamRead ¶meters) = 0;
|
virtual bool BlockingWrite(AuUInt64 offset, const Memory::MemoryViewStreamRead ¶meters) = 0;
|
||||||
|
|
||||||
|
AURT_ADD_USR_DATA;
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -102,5 +102,7 @@ namespace Aurora::IO::FS
|
|||||||
* @brief
|
* @brief
|
||||||
*/
|
*/
|
||||||
virtual IO::IStreamWriter *ToStreamWriter() = 0;
|
virtual IO::IStreamWriter *ToStreamWriter() = 0;
|
||||||
|
|
||||||
|
AURT_ADD_USR_DATA;
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -85,23 +85,12 @@ namespace Aurora::IO
|
|||||||
|
|
||||||
virtual void SetBaseOffset(AuUInt64 uBaseOffset) = 0;
|
virtual void SetBaseOffset(AuUInt64 uBaseOffset) = 0;
|
||||||
|
|
||||||
// TODO: remove me (new api stub)
|
virtual bool TryAttachToCompletionGroup(const AuSPtr<CompletionGroup::ICompletionGroup> &pCompletionGroup) = 0;
|
||||||
inline virtual bool TryAttachToCompletionGroup(const AuSPtr<CompletionGroup::ICompletionGroup> &pCompletionGroup)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: remove me (new api stub)
|
virtual CompletionGroup::ICompletionGroupWorkHandle *ToCompletionGroupHandle() = 0;
|
||||||
inline virtual CompletionGroup::ICompletionGroupWorkHandle *ToCompletionGroupHandle()
|
|
||||||
{
|
virtual AuSPtr<CompletionGroup::ICompletionGroup> GetCompletionGroup() = 0;
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline virtual AuSPtr<CompletionGroup::ICompletionGroup> GetCompletionGroup()
|
AURT_ADD_USR_DATA_EXP(this->ToCompletionGroupHandle());
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
AURT_ADD_USR_DATA;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -135,5 +135,7 @@ namespace Aurora::Processes
|
|||||||
virtual bool TryAttachProcessExitToCompletionGroup(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pCompletionGroup) = 0;
|
virtual bool TryAttachProcessExitToCompletionGroup(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pCompletionGroup) = 0;
|
||||||
|
|
||||||
virtual IO::CompletionGroup::ICompletionGroupWorkHandle *ToCompletionGroupHandle() = 0;
|
virtual IO::CompletionGroup::ICompletionGroupWorkHandle *ToCompletionGroupHandle() = 0;
|
||||||
|
|
||||||
|
AURT_ADD_USR_DATA_EXP(this->ToCompletionGroupHandle());
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -35,6 +35,8 @@ namespace Aurora::Processes
|
|||||||
virtual IProcess *GetProcess() = 0;
|
virtual IProcess *GetProcess() = 0;
|
||||||
virtual bool TryAttachProcessExitToCompletionGroup(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pCompletionGroup) = 0;
|
virtual bool TryAttachProcessExitToCompletionGroup(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pCompletionGroup) = 0;
|
||||||
virtual IO::CompletionGroup::ICompletionGroupWorkHandle *ToCompletionGroupHandle() = 0;
|
virtual IO::CompletionGroup::ICompletionGroupWorkHandle *ToCompletionGroupHandle() = 0;
|
||||||
|
|
||||||
|
AURT_ADD_USR_DATA_EXP(this->ToCompletionGroupHandle());
|
||||||
};
|
};
|
||||||
|
|
||||||
AUKN_SYM OutputOfResult OutputOf(StartupParameters &¶meters,
|
AUKN_SYM OutputOfResult OutputOf(StartupParameters &¶meters,
|
||||||
|
@ -96,6 +96,30 @@ namespace Aurora::Utility
|
|||||||
AuResetMember(this->_auReservedUserData.pData);\
|
AuResetMember(this->_auReservedUserData.pData);\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define AURT_ADD_USR_DATA_EXP(exp) \
|
||||||
|
inline virtual AURT_PRIVATE_DATA_PTR PrivateUserDataGet()\
|
||||||
|
{\
|
||||||
|
return exp->PrivateUserDataGet();\
|
||||||
|
}\
|
||||||
|
inline virtual bool PrivateUserDataExchange(AURT_PRIVATE_DATA_PTR pExpect, AURT_PRIVATE_DATA_PTR pReplace)\
|
||||||
|
{\
|
||||||
|
return exp->PrivateUserDataExchange(pExpect, pReplace);\
|
||||||
|
}\
|
||||||
|
template<typename T>\
|
||||||
|
inline AuSPtr<T> PrivateUserDataNewData()\
|
||||||
|
{\
|
||||||
|
return exp->PrivateUserDataNewData<T>();\
|
||||||
|
}\
|
||||||
|
template<typename T>\
|
||||||
|
inline AuSPtr<T> PrivateUserDataGetSharedData()\
|
||||||
|
{\
|
||||||
|
return exp->PrivateUserDataGetSharedData<T>();\
|
||||||
|
}\
|
||||||
|
inline Aurora::Threading::Primitives::IHyperWaitable *PrivateUserDataToUtilityMutex()\
|
||||||
|
{\
|
||||||
|
return exp->PrivateUserDataToUtilityMutex();\
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(AURORA_USR_DATA_DISABLED)
|
#if defined(AURORA_USR_DATA_DISABLED)
|
||||||
#undef AURT_ADD_USR_DATA
|
#undef AURT_ADD_USR_DATA
|
||||||
#define AURT_ADD_USR_DATA
|
#define AURT_ADD_USR_DATA
|
||||||
|
Loading…
Reference in New Issue
Block a user