os: refactor/rewrite entire namespace.

This commit is contained in:
Michael Scire
2020-04-08 02:21:35 -07:00
parent 6193283f03
commit 065485b971
181 changed files with 5353 additions and 1929 deletions

View File

@@ -83,7 +83,7 @@ namespace ams::ncm {
ContentMetaDatabaseRoot() { /* ... */ }
};
private:
os::RecursiveMutex mutex;
os::Mutex mutex;
bool initialized;
ContentStorageRoot content_storage_roots[MaxContentStorageRoots];
ContentMetaDatabaseRoot content_meta_database_roots[MaxContentMetaDatabaseRoots];
@@ -91,7 +91,7 @@ namespace ams::ncm {
u32 num_content_meta_entries;
RightsIdCache rights_id_cache;
public:
ContentManagerImpl() : initialized(false) { /* ... */ };
ContentManagerImpl() : mutex(true), initialized(false) { /* ... */ };
~ContentManagerImpl();
public:
Result Initialize(const ContentManagerConfig &config);

View File

@@ -102,7 +102,7 @@ namespace ams::ncm {
return result;
}
public:
InstallTaskBase() : data(), progress(), cancel_requested() { /* ... */ }
InstallTaskBase() : data(), progress(), progress_mutex(false), cancel_mutex(false), cancel_requested(), throughput_mutex(false) { /* ... */ }
virtual ~InstallTaskBase() { /* ... */ };
public:
virtual void Cancel();

View File

@@ -37,7 +37,7 @@ namespace ams::ncm {
u64 counter;
os::Mutex mutex;
public:
RightsIdCache() {
RightsIdCache() : mutex(false) {
this->Invalidate();
}