mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 14:58:22 -04:00
os: refactor/rewrite entire namespace.
This commit is contained in:
parent
6193283f03
commit
065485b971
181 changed files with 5353 additions and 1929 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace ams::fssystem {
|
||||
|
||||
AesXtsStorage::AesXtsStorage(IStorage *base, const void *key1, const void *key2, size_t key_size, const void *iv, size_t iv_size, size_t block_size) : base_storage(base), block_size(block_size), mutex() {
|
||||
AesXtsStorage::AesXtsStorage(IStorage *base, const void *key1, const void *key2, size_t key_size, const void *iv, size_t iv_size, size_t block_size) : base_storage(base), block_size(block_size), mutex(false) {
|
||||
AMS_ASSERT(base != nullptr);
|
||||
AMS_ASSERT(key1 != nullptr);
|
||||
AMS_ASSERT(key2 != nullptr);
|
||||
|
|
|
@ -74,13 +74,13 @@ namespace ams::fssystem {
|
|||
}
|
||||
|
||||
DirectorySaveDataFileSystem::DirectorySaveDataFileSystem(std::shared_ptr<fs::fsa::IFileSystem> fs)
|
||||
: PathResolutionFileSystem(fs), open_writable_files(0)
|
||||
: PathResolutionFileSystem(fs), accessor_mutex(false), open_writable_files(0)
|
||||
{
|
||||
/* ... */
|
||||
}
|
||||
|
||||
DirectorySaveDataFileSystem::DirectorySaveDataFileSystem(std::unique_ptr<fs::fsa::IFileSystem> fs)
|
||||
: PathResolutionFileSystem(std::move(fs)), open_writable_files(0)
|
||||
: PathResolutionFileSystem(std::move(fs)), accessor_mutex(false), open_writable_files(0)
|
||||
{
|
||||
/* ... */
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ams::fssystem {
|
|||
uintptr_t address;
|
||||
size_t size;
|
||||
public:
|
||||
constexpr AdditionalDeviceAddressEntry() : mutex(), is_registered(), address(), size() { /* ... */ }
|
||||
constexpr AdditionalDeviceAddressEntry() : mutex(false), is_registered(), address(), size() { /* ... */ }
|
||||
|
||||
void Register(uintptr_t addr, size_t sz) {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
|
@ -78,7 +78,7 @@ namespace ams::fssystem {
|
|||
constexpr size_t HeapAllocatableSizeMaxForLarge = HeapBlockSize * (static_cast<size_t>(1) << HeapOrderMaxForLarge);
|
||||
|
||||
/* TODO: SdkMutex */
|
||||
os::Mutex g_heap_mutex;
|
||||
os::Mutex g_heap_mutex(false);
|
||||
FileSystemBuddyHeap g_heap;
|
||||
|
||||
std::atomic<size_t> g_retry_count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue