mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
[Kernel] Register CreateMutex in the SVC table
This commit is contained in:
parent
015343a848
commit
72132cd97e
3 changed files with 9 additions and 0 deletions
|
@ -82,6 +82,7 @@ class Kernel {
|
|||
void clearEvent();
|
||||
void createAddressArbiter();
|
||||
void createEvent();
|
||||
void createMutex();
|
||||
void createThread();
|
||||
void controlMemory();
|
||||
void duplicateHandle();
|
||||
|
|
|
@ -24,6 +24,7 @@ void Kernel::serviceSVC(u32 svc) {
|
|||
case 0x02: queryMemory(); break;
|
||||
case 0x08: createThread(); break;
|
||||
case 0x0A: svcSleepThread(); break;
|
||||
case 0x13: createMutex(); break;
|
||||
case 0x14: releaseMutex(); break;
|
||||
case 0x17: createEvent(); break;
|
||||
case 0x18: signalEvent(); break;
|
||||
|
|
|
@ -213,6 +213,13 @@ void Kernel::getThreadID() {
|
|||
regs[1] = thread->getData<Thread>()->index;
|
||||
}
|
||||
|
||||
void Kernel::createMutex() {
|
||||
bool locked = regs[1] != 0;
|
||||
Helpers::panic("CreateMutex (initially locked: %s)\n", locked ? "yes" : "no");
|
||||
|
||||
regs[0] = SVCResult::Success;
|
||||
}
|
||||
|
||||
void Kernel::releaseMutex() {
|
||||
const Handle handle = regs[0];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue