diff --git a/stratosphere/ncm/source/impl/ncm_content_manager.cpp b/stratosphere/ncm/source/impl/ncm_content_manager.cpp index 46c2ef0ba..54a2c0837 100644 --- a/stratosphere/ncm/source/impl/ncm_content_manager.cpp +++ b/stratosphere/ncm/source/impl/ncm_content_manager.cpp @@ -145,7 +145,7 @@ namespace ams::ncm::impl { } Result InitializeContentManager() { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); /* Already initialized. */ if (g_initialized) { @@ -256,7 +256,7 @@ namespace ams::ncm::impl { void FinalizeContentManager() { { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); for (size_t i = 0; i < MaxContentStorageEntries; i++) { ContentStorageEntry* entry = &g_content_storage_entries[i]; @@ -281,7 +281,7 @@ namespace ams::ncm::impl { } Result CreateContentStorage(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -306,7 +306,7 @@ namespace ams::ncm::impl { } Result VerifyContentStorage(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -334,7 +334,7 @@ namespace ams::ncm::impl { } Result OpenContentStorage(std::shared_ptr* out, StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -378,7 +378,7 @@ namespace ams::ncm::impl { } Result CloseContentStorageForcibly(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None) { return ResultUnknownStorage(); @@ -402,7 +402,7 @@ namespace ams::ncm::impl { } Result ActivateContentStorage(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -460,7 +460,7 @@ namespace ams::ncm::impl { } Result InactivateContentStorage(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -484,7 +484,7 @@ namespace ams::ncm::impl { } Result CreateContentMetaDatabase(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || storage_id == StorageId::GameCard || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -517,7 +517,7 @@ namespace ams::ncm::impl { } Result VerifyContentMetaDatabase(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::GameCard) { return ResultSuccess(); @@ -556,7 +556,7 @@ namespace ams::ncm::impl { } Result OpenContentMetaDatabase(std::shared_ptr* out, StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -600,7 +600,7 @@ namespace ams::ncm::impl { } Result CloseContentMetaDatabaseForcibly(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None) { return ResultUnknownStorage(); @@ -631,7 +631,7 @@ namespace ams::ncm::impl { } Result CleanupContentMetaDatabase(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -648,7 +648,7 @@ namespace ams::ncm::impl { } Result ActivateContentMetaDatabase(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); @@ -684,7 +684,7 @@ namespace ams::ncm::impl { } Result InactivateContentMetaDatabase(StorageId storage_id) { - std::scoped_lock lk(g_mutex); + std::scoped_lock lk(g_mutex); if (storage_id == StorageId::None || static_cast(storage_id) == 6) { return ResultUnknownStorage(); diff --git a/stratosphere/ncm/source/ncm_contentstorage.cpp b/stratosphere/ncm/source/ncm_contentstorage.cpp index 37b10f236..4f641f114 100644 --- a/stratosphere/ncm/source/ncm_contentstorage.cpp +++ b/stratosphere/ncm/source/ncm_contentstorage.cpp @@ -429,7 +429,7 @@ namespace ams::ncm { R_TRY(this->EnsureEnabled()); { - std::scoped_lock lk(this->rights_id_cache->mutex); + std::scoped_lock lk(this->rights_id_cache->mutex); /* Attempt to locate the content id in the cache. */ for (size_t i = 0; i < impl::RightsIdCache::MaxEntries; i++) { @@ -454,7 +454,7 @@ namespace ams::ncm { R_TRY(fsGetRightsIdAndKeyGenerationByPath(common_path, &key_generation, &rights_id)); { - std::scoped_lock lk(this->rights_id_cache->mutex); + std::scoped_lock lk(this->rights_id_cache->mutex); impl::RightsIdCache::Entry* eviction_candidate = &this->rights_id_cache->entries[0]; /* Find a suitable existing entry to store our new one at. */ @@ -598,7 +598,7 @@ namespace ams::ncm { R_TRY(this->EnsureEnabled()); { - std::scoped_lock lk(this->rights_id_cache->mutex); + std::scoped_lock lk(this->rights_id_cache->mutex); /* Attempt to locate the content id in the cache. */ for (size_t i = 0; i < impl::RightsIdCache::MaxEntries; i++) { @@ -623,7 +623,7 @@ namespace ams::ncm { R_TRY(fsGetRightsIdAndKeyGenerationByPath(common_path, &key_generation, &rights_id)); { - std::scoped_lock lk(this->rights_id_cache->mutex); + std::scoped_lock lk(this->rights_id_cache->mutex); impl::RightsIdCache::Entry* eviction_candidate = &this->rights_id_cache->entries[0]; /* Find a suitable existing entry to store our new one at. */ diff --git a/stratosphere/ncm/source/ncm_fs.cpp b/stratosphere/ncm/source/ncm_fs.cpp index c4a42b132..1444c2299 100644 --- a/stratosphere/ncm/source/ncm_fs.cpp +++ b/stratosphere/ncm/source/ncm_fs.cpp @@ -226,7 +226,7 @@ namespace ams::ncm::fs { static os::Mutex g_mount_index_lock; MountName CreateUniqueMountName() { - std::scoped_lock lk(g_mount_index_lock); + std::scoped_lock lk(g_mount_index_lock); MountName mount_name; g_mount_index++; snprintf(mount_name.name, sizeof(MountName), "@ncm%08x", g_mount_index);