mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 05:34:11 -04:00
libstrat: namespace hossynch.hpp
This commit is contained in:
parent
73d904036d
commit
bb223eb5ae
57 changed files with 923 additions and 773 deletions
|
@ -25,12 +25,12 @@
|
|||
namespace sts::sm::impl {
|
||||
|
||||
/* Utilities. */
|
||||
HosRecursiveMutex &GetUserSessionMutex();
|
||||
HosRecursiveMutex &GetMitmSessionMutex();
|
||||
os::RecursiveMutex &GetUserSessionMutex();
|
||||
os::RecursiveMutex &GetMitmSessionMutex();
|
||||
|
||||
template<typename F>
|
||||
Result DoWithUserSession(F f) {
|
||||
std::scoped_lock<HosRecursiveMutex &> lk(GetUserSessionMutex());
|
||||
std::scoped_lock<os::RecursiveMutex &> lk(GetUserSessionMutex());
|
||||
{
|
||||
R_ASSERT(smInitialize());
|
||||
ON_SCOPE_EXIT { smExit(); };
|
||||
|
@ -41,7 +41,7 @@ namespace sts::sm::impl {
|
|||
|
||||
template<typename F>
|
||||
Result DoWithMitmSession(F f) {
|
||||
std::scoped_lock<HosRecursiveMutex &> lk(GetMitmSessionMutex());
|
||||
std::scoped_lock<os::RecursiveMutex &> lk(GetMitmSessionMutex());
|
||||
{
|
||||
R_ASSERT(smAtmosphereMitmInitialize());
|
||||
ON_SCOPE_EXIT { smAtmosphereMitmExit(); };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue