mutex: fix svcArbitrateLock call arguments

1st (thread handle) and 3rd (tag) arguments were swapped.
This commit is contained in:
Sergi Granell 2023-09-09 13:55:38 +02:00
parent 4fcdb6eb34
commit 41196abe11

View File

@ -55,7 +55,7 @@ void mutexLock(Mutex* m) {
} }
// Ask the kernel to arbitrate the lock for us. // Ask the kernel to arbitrate the lock for us.
if (UNLIKELY(R_FAILED(svcArbitrateLock(value & ~HANDLE_WAIT_MASK, m, cur_handle)))) { if (UNLIKELY(R_FAILED(svcArbitrateLock(cur_handle, m, value & ~HANDLE_WAIT_MASK)))) {
// This should be impossible under normal circumstances. // This should be impossible under normal circumstances.
svcBreak(BreakReason_Assert, 0, 0); svcBreak(BreakReason_Assert, 0, 0);
} }