stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex
This commit is contained in:
@@ -23,15 +23,19 @@ namespace ams::mitm::settings {
|
||||
|
||||
namespace {
|
||||
|
||||
os::Mutex g_firmware_version_lock(false);
|
||||
bool g_cached_firmware_version;
|
||||
settings::FirmwareVersion g_firmware_version;
|
||||
settings::FirmwareVersion g_ams_firmware_version;
|
||||
constinit os::SdkMutex g_firmware_version_lock;
|
||||
constinit bool g_cached_firmware_version;
|
||||
constinit settings::FirmwareVersion g_firmware_version;
|
||||
constinit settings::FirmwareVersion g_ams_firmware_version;
|
||||
|
||||
void CacheFirmwareVersion() {
|
||||
if (AMS_LIKELY(g_cached_firmware_version)) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::scoped_lock lk(g_firmware_version_lock);
|
||||
|
||||
if (AMS_LIKELY(g_cached_firmware_version)) {
|
||||
if (AMS_UNLIKELY(g_cached_firmware_version)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user