stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex
This commit is contained in:
@@ -102,7 +102,7 @@ namespace ams::ncm {
|
||||
ContentMetaDatabaseRoot() { /* ... */ }
|
||||
};
|
||||
private:
|
||||
os::Mutex mutex;
|
||||
os::SdkRecursiveMutex mutex;
|
||||
bool initialized;
|
||||
ContentStorageRoot content_storage_roots[MaxContentStorageRoots];
|
||||
ContentMetaDatabaseRoot content_meta_database_roots[MaxContentMetaDatabaseRoots];
|
||||
@@ -111,8 +111,8 @@ namespace ams::ncm {
|
||||
RightsIdCache rights_id_cache;
|
||||
RegisteredHostContent registered_host_content;
|
||||
public:
|
||||
ContentManagerImpl() : mutex(true), initialized(false), num_content_storage_entries(0), num_content_meta_entries(0), rights_id_cache(), registered_host_content() {
|
||||
/* ... */
|
||||
ContentManagerImpl() : mutex(), initialized(false), num_content_storage_entries(0), num_content_meta_entries(0), rights_id_cache(), registered_host_content() {
|
||||
/* ... */
|
||||
};
|
||||
~ContentManagerImpl();
|
||||
public:
|
||||
|
||||
@@ -86,13 +86,13 @@ namespace ams::ncm {
|
||||
StorageId install_storage;
|
||||
InstallTaskDataBase *data;
|
||||
InstallProgress progress;
|
||||
os::Mutex progress_mutex;
|
||||
os::SdkMutex progress_mutex;
|
||||
u32 config;
|
||||
os::Mutex cancel_mutex;
|
||||
os::SdkMutex cancel_mutex;
|
||||
bool cancel_requested;
|
||||
InstallThroughput throughput;
|
||||
TimeSpan throughput_start_time;
|
||||
os::Mutex throughput_mutex;
|
||||
os::SdkMutex throughput_mutex;
|
||||
FirmwareVariationId firmware_variation_id;
|
||||
private:
|
||||
ALWAYS_INLINE Result SetLastResultOnFailure(Result result) {
|
||||
@@ -102,7 +102,7 @@ namespace ams::ncm {
|
||||
return result;
|
||||
}
|
||||
public:
|
||||
InstallTaskBase() : data(), progress(), progress_mutex(false), cancel_mutex(false), cancel_requested(), throughput_mutex(false) { /* ... */ }
|
||||
InstallTaskBase() : data(), progress(), progress_mutex(), cancel_mutex(), cancel_requested(), throughput_mutex() { /* ... */ }
|
||||
virtual ~InstallTaskBase() { /* ... */ };
|
||||
public:
|
||||
virtual void Cancel();
|
||||
|
||||
@@ -40,13 +40,13 @@ namespace ams::ncm {
|
||||
|
||||
class HeapState {
|
||||
private:
|
||||
os::Mutex mutex;
|
||||
os::SdkMutex mutex;
|
||||
lmem::HeapHandle heap_handle;
|
||||
size_t total_alloc_size;
|
||||
size_t peak_total_alloc_size;
|
||||
size_t peak_alloc_size;
|
||||
public:
|
||||
constexpr HeapState() : mutex(false), heap_handle(nullptr), total_alloc_size(0), peak_total_alloc_size(0), peak_alloc_size(0) { /* ... */ }
|
||||
constexpr HeapState() : mutex(), heap_handle(nullptr), total_alloc_size(0), peak_total_alloc_size(0), peak_alloc_size(0) { /* ... */ }
|
||||
|
||||
void Initialize(lmem::HeapHandle heap_handle);
|
||||
void Allocate(size_t size);
|
||||
|
||||
Reference in New Issue
Block a user