Initial idle skip implementation

This commit is contained in:
wheremyfoodat
2024-01-27 01:58:21 +02:00
parent 52accdde43
commit 99a1a0133d
5 changed files with 34 additions and 7 deletions

View File

@@ -127,6 +127,7 @@ void Kernel::waitSynchronization1() {
t.waitList.resize(1);
t.status = ThreadStatus::WaitSync1;
t.sleepTick = cpu.getTicks();
t.wakeupTick = getWakeupTick(ns);
t.waitingNanoseconds = ns;
t.waitList[0] = handle;
@@ -222,6 +223,7 @@ void Kernel::waitSynchronizationN() {
t.outPointer = outPointer;
t.waitingNanoseconds = ns;
t.sleepTick = cpu.getTicks();
t.wakeupTick = getWakeupTick(ns);
for (s32 i = 0; i < handleCount; i++) {
t.waitList[i] = waitObjects[i].first; // Add object to this thread's waitlist