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

@ -21,15 +21,12 @@ namespace ams::lmem {
HeapHandle CreateExpHeap(void *address, size_t size, u32 option) {
HeapHandle handle = impl::CreateExpHeap(address, size, option);
if (option & CreateOption_ThreadSafe) {
os::InitializeMutex(std::addressof(handle->mutex), false, 0);
os::InitializeSdkMutex(std::addressof(handle->mutex));
}
return handle;
}
void DestroyExpHeap(HeapHandle handle) {
if (handle->option & CreateOption_ThreadSafe) {
os::FinalizeMutex(std::addressof(handle->mutex));
}
impl::DestroyExpHeap(handle);
}