diff options
author | Lioncash <mathew1800@gmail.com> | 2016-03-21 07:48:40 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2016-03-21 07:57:12 +0100 |
commit | 6b7ebb3f82ae9674f2a4d66e870a53102b412003 (patch) | |
tree | 6b6f018c35d6c8245a2944bca6f5d1209410490b /src/core/hle/hle.cpp | |
parent | Merge pull request #1302 from Subv/save_fix (diff) | |
download | yuzu-6b7ebb3f82ae9674f2a4d66e870a53102b412003.tar yuzu-6b7ebb3f82ae9674f2a4d66e870a53102b412003.tar.gz yuzu-6b7ebb3f82ae9674f2a4d66e870a53102b412003.tar.bz2 yuzu-6b7ebb3f82ae9674f2a4d66e870a53102b412003.tar.lz yuzu-6b7ebb3f82ae9674f2a4d66e870a53102b412003.tar.xz yuzu-6b7ebb3f82ae9674f2a4d66e870a53102b412003.tar.zst yuzu-6b7ebb3f82ae9674f2a4d66e870a53102b412003.zip |
Diffstat (limited to 'src/core/hle/hle.cpp')
-rw-r--r-- | src/core/hle/hle.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index 331b1b22a..3b1369800 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp @@ -14,9 +14,13 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// -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 +33,21 @@ void Reschedule(const char *reason) { Core::g_app_core->PrepareReschedule(); - g_reschedule = true; + reschedule = true; +} + +bool RescheduleIsPending() { + return reschedule; +} + +void DoneRescheduling() { + reschedule = false; } void Init() { Service::Init(); - g_reschedule = false; + reschedule = false; LOG_DEBUG(Kernel, "initialized OK"); } |