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

@@ -35,13 +35,13 @@ namespace ams::kern {
ServerClosed = 3,
};
private:
std::atomic<std::underlying_type<State>::type> m_atomic_state;
bool m_initialized;
KServerSession m_server;
KClientSession m_client;
std::atomic<std::underlying_type<State>::type> m_atomic_state;
KClientPort *m_port;
uintptr_t m_name;
KProcess *m_process;
bool m_initialized;
private:
ALWAYS_INLINE void SetState(State state) {
m_atomic_state = static_cast<u8>(state);
@@ -52,7 +52,7 @@ namespace ams::kern {
}
public:
constexpr KSession()
: m_server(), m_client(), m_atomic_state(static_cast<std::underlying_type<State>::type>(State::Invalid)), m_port(), m_name(), m_process(), m_initialized()
: m_atomic_state(static_cast<std::underlying_type<State>::type>(State::Invalid)), m_initialized(), m_server(), m_client(), m_port(), m_name(), m_process()
{
/* ... */
}