kern: use new AtomicRef, use Atomic<bool>

This commit is contained in:
Michael Scire 2021-10-20 13:29:38 -07:00
parent aed9d3f535
commit 20716cb3de
7 changed files with 334 additions and 160 deletions
libraries/libmesosphere/source

View file

@ -1184,7 +1184,7 @@ namespace ams::kern {
/* Determine if this is the first termination request. */
const bool first_request = [&] ALWAYS_INLINE_LAMBDA () -> bool {
/* Perform an atomic compare-and-swap from false to true. */
u8 expected = false;
bool expected = false;
return m_termination_requested.CompareExchangeStrong(expected, true);
}();