summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/scheduler.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-10-28 03:01:45 +0100
committerLioncash <mathew1800@gmail.com>2019-10-28 03:12:32 +0100
commit2dc469cebac90462fcc48edcf5c1b77148825957 (patch)
treec22a32ed1a1990d9bfac0b49f013a2a4ac4ba0b4 /src/core/hle/kernel/scheduler.cpp
parentMerge pull request #2971 from FernandoS27/new-scheduler-v2 (diff)
downloadyuzu-2dc469cebac90462fcc48edcf5c1b77148825957.tar
yuzu-2dc469cebac90462fcc48edcf5c1b77148825957.tar.gz
yuzu-2dc469cebac90462fcc48edcf5c1b77148825957.tar.bz2
yuzu-2dc469cebac90462fcc48edcf5c1b77148825957.tar.lz
yuzu-2dc469cebac90462fcc48edcf5c1b77148825957.tar.xz
yuzu-2dc469cebac90462fcc48edcf5c1b77148825957.tar.zst
yuzu-2dc469cebac90462fcc48edcf5c1b77148825957.zip
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
-rw-r--r--src/core/hle/kernel/scheduler.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index e6dcb9639..53281cc6c 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -35,24 +35,11 @@ void GlobalScheduler::RemoveThread(const Thread* thread) {
thread_list.end());
}
-/*
- * UnloadThread selects a core and forces it to unload its current thread's context
- */
void GlobalScheduler::UnloadThread(s32 core) {
Scheduler& sched = system.Scheduler(core);
sched.UnloadThread();
}
-/*
- * SelectThread takes care of selecting the new scheduled thread.
- * It does it in 3 steps:
- * - First a thread is selected from the top of the priority queue. If no thread
- * is obtained then we move to step two, else we are done.
- * - Second we try to get a suggested thread that's not assigned to any core or
- * that is not the top thread in that core.
- * - Third is no suggested thread is found, we do a second pass and pick a running
- * thread in another core and swap it with its current thread.
- */
void GlobalScheduler::SelectThread(u32 core) {
const auto update_thread = [](Thread* thread, Scheduler& sched) {
if (thread != sched.selected_thread) {
@@ -114,10 +101,6 @@ void GlobalScheduler::SelectThread(u32 core) {
update_thread(current_thread, sched);
}
-/*
- * YieldThread takes a thread and moves it to the back of the it's priority list
- * This operation can be redundant and no scheduling is changed if marked as so.
- */
bool GlobalScheduler::YieldThread(Thread* yielding_thread) {
// Note: caller should use critical section, etc.
const u32 core_id = static_cast<u32>(yielding_thread->GetProcessorID());
@@ -132,12 +115,6 @@ bool GlobalScheduler::YieldThread(Thread* yielding_thread) {
return AskForReselectionOrMarkRedundant(yielding_thread, winner);
}
-/*
- * YieldThreadAndBalanceLoad takes a thread and moves it to the back of the it's priority list.
- * Afterwards, tries to pick a suggested thread from the suggested queue that has worse time or
- * a better priority than the next thread in the core.
- * This operation can be redundant and no scheduling is changed if marked as so.
- */
bool GlobalScheduler::YieldThreadAndBalanceLoad(Thread* yielding_thread) {
// Note: caller should check if !thread.IsSchedulerOperationRedundant and use critical section,
// etc.
@@ -189,12 +166,6 @@ bool GlobalScheduler::YieldThreadAndBalanceLoad(Thread* yielding_thread) {
return AskForReselectionOrMarkRedundant(yielding_thread, winner);
}
-/*
- * YieldThreadAndWaitForLoadBalancing takes a thread and moves it out of the scheduling queue
- * and into the suggested queue. If no thread can be squeduled afterwards in that core,
- * a suggested thread is obtained instead.
- * This operation can be redundant and no scheduling is changed if marked as so.
- */
bool GlobalScheduler::YieldThreadAndWaitForLoadBalancing(Thread* yielding_thread) {
// Note: caller should check if !thread.IsSchedulerOperationRedundant and use critical section,
// etc.