summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_scheduler.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-04 06:56:02 +0100
committerbunnei <bunneidev@gmail.com>2020-12-06 09:03:24 +0100
commit4756cb203e8ef09377988eb1b49ca20ef45f4492 (patch)
tree69aed28dbf048dea702665e68797f14c20650276 /src/core/hle/kernel/k_scheduler.cpp
parenthle: kernel: Separate KScheduler from GlobalSchedulerContext class. (diff)
downloadyuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar
yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.gz
yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.bz2
yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.lz
yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.xz
yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.zst
yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.zip
Diffstat (limited to 'src/core/hle/kernel/k_scheduler.cpp')
-rw-r--r--src/core/hle/kernel/k_scheduler.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp
index c7e2eabd4..466147498 100644
--- a/src/core/hle/kernel/k_scheduler.cpp
+++ b/src/core/hle/kernel/k_scheduler.cpp
@@ -14,6 +14,7 @@
#include "core/core_timing.h"
#include "core/cpu_manager.h"
#include "core/hle/kernel/k_scheduler.h"
+#include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/physical_core.h"
#include "core/hle/kernel/process.h"
@@ -800,28 +801,4 @@ SchedulerLock::~SchedulerLock() {
kernel.GlobalSchedulerContext().Unlock();
}
-SchedulerLockAndSleep::SchedulerLockAndSleep(KernelCore& kernel, Handle& event_handle,
- Thread* time_task, s64 nanoseconds)
- : SchedulerLock{kernel}, event_handle{event_handle}, time_task{time_task}, nanoseconds{
- nanoseconds} {
- event_handle = InvalidHandle;
-}
-
-SchedulerLockAndSleep::~SchedulerLockAndSleep() {
- if (sleep_cancelled) {
- return;
- }
- auto& time_manager = kernel.TimeManager();
- time_manager.ScheduleTimeEvent(event_handle, time_task, nanoseconds);
-}
-
-void SchedulerLockAndSleep::Release() {
- if (sleep_cancelled) {
- return;
- }
- auto& time_manager = kernel.TimeManager();
- time_manager.ScheduleTimeEvent(event_handle, time_task, nanoseconds);
- sleep_cancelled = true;
-}
-
} // namespace Kernel