mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 17:14:28 -04:00
strat: no longer materially constrained by sm session limit
This commit is contained in:
parent
997e4dd665
commit
2e1a93f1d1
37 changed files with 215 additions and 333 deletions
|
@ -21,24 +21,9 @@
|
|||
namespace ams::sm::impl {
|
||||
|
||||
/* Utilities. */
|
||||
os::Mutex &GetUserSessionMutex();
|
||||
os::Mutex &GetMitmAcknowledgementSessionMutex();
|
||||
os::Mutex &GetPerThreadSessionMutex();
|
||||
|
||||
template<typename F>
|
||||
Result DoWithUserSession(F f) {
|
||||
std::scoped_lock lk(GetUserSessionMutex());
|
||||
{
|
||||
R_ABORT_UNLESS(smInitialize());
|
||||
ON_SCOPE_EXIT {
|
||||
R_ABORT_UNLESS(smDetachClient());
|
||||
smExit();
|
||||
};
|
||||
|
||||
return f();
|
||||
}
|
||||
}
|
||||
|
||||
template<typename F>
|
||||
Result DoWithMitmAcknowledgementSession(F f) {
|
||||
std::scoped_lock lk(GetMitmAcknowledgementSessionMutex());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue