ams: revamp assertion system

This commit is contained in:
Michael Scire 2020-02-22 23:05:14 -08:00
parent 9572fb2ce3
commit 40400aee1f
168 changed files with 1014 additions and 696 deletions

View file

@ -29,7 +29,7 @@ namespace ams::sm::impl {
Result DoWithUserSession(F f) {
std::scoped_lock<os::RecursiveMutex &> lk(GetUserSessionMutex());
{
R_ASSERT(smInitialize());
R_ABORT_UNLESS(smInitialize());
ON_SCOPE_EXIT { smExit(); };
return f();
@ -40,7 +40,7 @@ namespace ams::sm::impl {
Result DoWithMitmAcknowledgementSession(F f) {
std::scoped_lock<os::RecursiveMutex &> lk(GetMitmAcknowledgementSessionMutex());
{
R_ASSERT(smAtmosphereMitmInitialize());
R_ABORT_UNLESS(smAtmosphereMitmInitialize());
ON_SCOPE_EXIT { smAtmosphereMitmExit(); };
return f();
@ -52,7 +52,7 @@ namespace ams::sm::impl {
Service srv;
{
std::scoped_lock<os::RecursiveMutex &> lk(GetPerThreadSessionMutex());
R_ASSERT(smAtmosphereOpenSession(&srv));
R_ABORT_UNLESS(smAtmosphereOpenSession(&srv));
}
{
ON_SCOPE_EXIT { smAtmosphereCloseSession(&srv); };