aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/scheduler.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-06 09:52:24 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 11:35:28 -0400
commit1c672128c421ea3141a74f9c6695ecc83231ca30 (patch)
tree67af0f05adcdfce6aa1bd75d609e1c09190d54a7 /src/core/hle/kernel/scheduler.h
parentc43e55973425be2dfca06804a85493fc6f9c07d1 (diff)
Scheduler: Release old thread fiber before trying to switch to the next thread fiber.
Diffstat (limited to 'src/core/hle/kernel/scheduler.h')
-rw-r--r--src/core/hle/kernel/scheduler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h
index f73ca777e..728cca802 100644
--- a/src/core/hle/kernel/scheduler.h
+++ b/src/core/hle/kernel/scheduler.h
@@ -15,6 +15,10 @@
#include "core/hardware_properties.h"
#include "core/hle/kernel/thread.h"
+namespace Common {
+ class Fiber;
+}
+
namespace Core {
class ARM_Interface;
class System;
@@ -247,12 +251,17 @@ private:
*/
void UpdateLastContextSwitchTime(Thread* thread, Process* process);
+ static void OnSwitch(void* this_scheduler);
+ void SwitchToCurrent();
+
std::shared_ptr<Thread> current_thread = nullptr;
std::shared_ptr<Thread> selected_thread = nullptr;
std::shared_ptr<Thread> current_thread_prev = nullptr;
std::shared_ptr<Thread> selected_thread_set = nullptr;
std::shared_ptr<Thread> idle_thread = nullptr;
+ std::shared_ptr<Common::Fiber> switch_fiber = nullptr;
+
Core::System& system;
u64 last_context_switch_time = 0;
u64 idle_selection_count = 0;