Kernel/SVC: Don't let svcReleaseMutex release a mutex owned by another thread.

This behavior was reverse engineered from the 3DS kernel.
This commit is contained in:
Subv 2017-10-23 15:52:23 -05:00
parent ceb9880034
commit 68dba11805
4 changed files with 39 additions and 18 deletions

View file

@ -818,9 +818,7 @@ static ResultCode ReleaseMutex(Kernel::Handle handle) {
if (mutex == nullptr)
return ERR_INVALID_HANDLE;
mutex->Release();
return RESULT_SUCCESS;
return mutex->Release(Kernel::GetCurrentThread());
}
/// Get the ID of the specified process