summaryrefslogtreecommitdiffstats
path: root/src/core/hle/hle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/hle.cpp')
-rw-r--r--src/core/hle/hle.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp
index 331b1b22a..5c5373517 100644
--- a/src/core/hle/hle.cpp
+++ b/src/core/hle/hle.cpp
@@ -8,15 +8,17 @@
#include "core/arm/arm_interface.h"
#include "core/core.h"
#include "core/hle/hle.h"
-#include "core/hle/config_mem.h"
-#include "core/hle/shared_page.h"
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
-namespace HLE {
+namespace {
+
+bool reschedule; ///< If true, immediately reschedules the CPU to a new thread
-bool g_reschedule; ///< If true, immediately reschedules the CPU to a new thread
+}
+
+namespace HLE {
void Reschedule(const char *reason) {
DEBUG_ASSERT_MSG(reason != nullptr && strlen(reason) < 256, "Reschedule: Invalid or too long reason.");
@@ -29,13 +31,21 @@ void Reschedule(const char *reason) {
Core::g_app_core->PrepareReschedule();
- g_reschedule = true;
+ reschedule = true;
+}
+
+bool IsReschedulePending() {
+ return reschedule;
+}
+
+void DoneRescheduling() {
+ reschedule = false;
}
void Init() {
Service::Init();
- g_reschedule = false;
+ reschedule = false;
LOG_DEBUG(Kernel, "initialized OK");
}