kern/util: use custom atomics wrapper to substantially improve codegen

This commit is contained in:
Michael Scire
2021-10-19 15:24:15 -07:00
parent 52332e8d75
commit d74f364107
26 changed files with 688 additions and 260 deletions

View File

@@ -35,7 +35,7 @@ namespace ams::kern {
ServerClosed = 3,
};
private:
std::atomic<std::underlying_type<State>::type> m_atomic_state;
util::Atomic<std::underlying_type<State>::type> m_atomic_state;
bool m_initialized;
KServerSession m_server;
KClientSession m_client;
@@ -48,7 +48,7 @@ namespace ams::kern {
}
ALWAYS_INLINE State GetState() const {
return static_cast<State>(m_atomic_state.load());
return static_cast<State>(m_atomic_state.Load());
}
public:
constexpr KSession()