kern/util: update structure layouts to match Nintendo (saves 0x10 per KThread/KSession)

This commit is contained in:
Michael Scire 2021-10-16 16:13:10 -07:00
parent 7805a3624e
commit 26c02e2019
6 changed files with 15 additions and 12 deletions

View file

@ -71,10 +71,11 @@ namespace ams::kern {
private:
KAutoObject *m_next_closed_object;
std::atomic<u32> m_ref_count;
u32 m_reserved;
public:
static KAutoObject *Create(KAutoObject *ptr);
public:
constexpr ALWAYS_INLINE explicit KAutoObject() : m_next_closed_object(nullptr), m_ref_count(0) { MESOSPHERE_ASSERT_THIS(); }
constexpr ALWAYS_INLINE explicit KAutoObject() : m_next_closed_object(nullptr), m_ref_count(0), m_reserved(0) { MESOSPHERE_ASSERT_THIS(); }
/* Destroy is responsible for destroying the auto object's resources when ref_count hits zero. */
virtual void Destroy() { MESOSPHERE_ASSERT_THIS(); }