stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex

This commit is contained in:
Michael Scire 2021-09-29 22:52:50 -07:00
parent a4fe1bb5d8
commit 41ab4c2c68
70 changed files with 188 additions and 645 deletions

View file

@ -60,7 +60,7 @@ namespace ams::fs::impl {
}
FileSystemAccessor::FileSystemAccessor(const char *n, std::unique_ptr<fsa::IFileSystem> &&fs, std::unique_ptr<fsa::ICommonMountNameGenerator> &&generator)
: impl(std::move(fs)), open_list_lock(false), mount_name_generator(std::move(generator)),
: impl(std::move(fs)), open_list_lock(), mount_name_generator(std::move(generator)),
access_log_enabled(false), data_cache_attachable(false), path_cache_attachable(false), path_cache_attached(false), multi_commit_supported(false)
{
R_ABORT_UNLESS(ValidateMountName(n));

View file

@ -35,7 +35,7 @@ namespace ams::fs::impl {
std::unique_ptr<fsa::IFileSystem> impl;
FileList open_file_list;
DirList open_dir_list;
os::Mutex open_list_lock;
os::SdkMutex open_list_lock;
std::unique_ptr<fsa::ICommonMountNameGenerator> mount_name_generator;
bool access_log_enabled;
bool data_cache_attachable;

View file

@ -26,9 +26,9 @@ namespace ams::fs::impl {
using FileSystemList = util::IntrusiveListBaseTraits<FileSystemAccessor>::ListType;
private:
FileSystemList fs_list;
os::Mutex mutex;
os::SdkMutex mutex;
public:
constexpr MountTable() : fs_list(), mutex(false) { /* ... */ }
constexpr MountTable() : fs_list(), mutex() { /* ... */ }
private:
bool CanAcceptMountName(const char *name);
public: