2019-12-09 12:57:37 +01:00
|
|
|
/*
|
2020-01-24 11:10:40 +01:00
|
|
|
* Copyright (c) 2018-2020 Atmosphère-NX
|
2019-12-09 12:57:37 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2020-05-12 00:02:10 +02:00
|
|
|
#include <stratosphere.hpp>
|
2019-12-09 12:57:37 +01:00
|
|
|
#include "sm_utils.hpp"
|
|
|
|
|
|
|
|
namespace ams::sm::impl {
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
/* Globals. */
|
2020-04-08 11:21:35 +02:00
|
|
|
os::Mutex g_user_session_mutex(true);
|
|
|
|
os::Mutex g_mitm_ack_session_mutex(true);
|
|
|
|
os::Mutex g_per_thread_session_mutex(true);
|
2019-12-09 12:57:37 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Utilities. */
|
2020-04-08 11:21:35 +02:00
|
|
|
os::Mutex &GetUserSessionMutex() {
|
2019-12-09 12:57:37 +01:00
|
|
|
return g_user_session_mutex;
|
|
|
|
}
|
|
|
|
|
2020-04-08 11:21:35 +02:00
|
|
|
os::Mutex &GetMitmAcknowledgementSessionMutex() {
|
2019-12-09 12:57:37 +01:00
|
|
|
return g_mitm_ack_session_mutex;
|
|
|
|
}
|
|
|
|
|
2020-04-08 11:21:35 +02:00
|
|
|
os::Mutex &GetPerThreadSessionMutex() {
|
2019-12-09 12:57:37 +01:00
|
|
|
return g_per_thread_session_mutex;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|