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

@@ -42,11 +42,11 @@ namespace ams::fssrv {
class PeakCheckableMemoryResourceFromExpHeap : public ams::MemoryResource {
private:
lmem::HeapHandle heap_handle;
os::Mutex mutex;
os::SdkMutex mutex;
size_t peak_free_size;
size_t current_free_size;
public:
constexpr explicit PeakCheckableMemoryResourceFromExpHeap(size_t heap_size) : heap_handle(nullptr), mutex(false), peak_free_size(heap_size), current_free_size(heap_size) { /* ... */ }
constexpr explicit PeakCheckableMemoryResourceFromExpHeap(size_t heap_size) : heap_handle(nullptr), mutex(), peak_free_size(heap_size), current_free_size(heap_size) { /* ... */ }
void SetHeapHandle(lmem::HeapHandle handle) {
this->heap_handle = handle;
@@ -57,7 +57,7 @@ namespace ams::fssrv {
void ClearPeak() { this->peak_free_size = this->current_free_size; }
std::scoped_lock<os::Mutex> GetScopedLock() {
std::scoped_lock<os::SdkMutex> GetScopedLock() {
return std::scoped_lock(this->mutex);
}