mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 02:07:59 -05:00
Kernel: Initial implementation of thread preemption.
This commit is contained in:
committed by
FernandoS27
parent
103f3a2fe5
commit
b49c0dab87
@ -133,6 +133,8 @@ public:
|
||||
*/
|
||||
bool YieldThreadAndWaitForLoadBalancing(Thread* thread);
|
||||
|
||||
void PreemptThreads();
|
||||
|
||||
u32 CpuCoresCount() const {
|
||||
return NUM_CPU_CORES;
|
||||
}
|
||||
@ -153,6 +155,8 @@ private:
|
||||
std::array<Common::MultiLevelQueue<Thread*, THREADPRIO_COUNT>, NUM_CPU_CORES> suggested_queue;
|
||||
std::atomic<bool> reselection_pending;
|
||||
|
||||
std::array<u64, NUM_CPU_CORES> preemption_priorities = {59, 59, 59, 62};
|
||||
|
||||
/// Lists all thread ids that aren't deleted/etc.
|
||||
std::vector<SharedPtr<Thread>> thread_list;
|
||||
Core::System& system;
|
||||
|
Reference in New Issue
Block a user