mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Starting on sync object rewrite #3
This commit is contained in:
parent
517d1abee8
commit
c6c45408fe
4 changed files with 43 additions and 4 deletions
|
@ -111,6 +111,10 @@ void Kernel::waitSynchronization1() {
|
|||
t.sleepTick = cpu.getTicks();
|
||||
t.waitingNanoseconds = ns;
|
||||
t.waitList[0] = handle;
|
||||
|
||||
// Add the current thread to the object's wait list
|
||||
object->getWaitlist() |= (1ull << currentThreadIndex);
|
||||
|
||||
switchToNextThread();
|
||||
}
|
||||
}
|
||||
|
@ -148,8 +152,12 @@ void Kernel::waitSynchronizationN() {
|
|||
}
|
||||
|
||||
if (!isWaitable(object)) [[unlikely]] {
|
||||
//Helpers::panic("Tried to wait on a non waitable object. Type: %s, handle: %X\n", object->getTypeName(), handle);
|
||||
Helpers::panic("Tried to wait on a non waitable object in WaitSyncN. Type: %s, handle: %X\n",
|
||||
object->getTypeName(), handle);
|
||||
}
|
||||
|
||||
// Add the current thread to the object's wait list
|
||||
object->getWaitlist() |= (1ull << currentThreadIndex);
|
||||
}
|
||||
|
||||
regs[0] = SVCResult::Success;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue