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

@ -179,6 +179,8 @@ class CPU {
return scheduler;
}
void addTicks(u64 ticks) { env.AddTicks(ticks); }
void clearCache() { jit->ClearCache(); }
void runFrame();
};

View file

@ -95,6 +95,7 @@ public:
void releaseMutex(Mutex* moo);
void cancelTimer(Timer* timer);
void signalTimer(Handle timerHandle, Timer* timer);
u64 getWakeupTick(s64 ns);
// Wake up the thread with the highest priority out of all threads in the waitlist
// Returns the index of the woken up thread

View file

@ -123,6 +123,7 @@ struct Thread {
bool waitAll;
// For WaitSynchronizationN: The "out" pointer
u32 outPointer;
u64 wakeupTick;
// Thread context used for switching between threads
std::array<u32, 16> gprs;