diff options
| author | 2019-03-16 00:43:09 -0400 | |
|---|---|---|
| committer | 2019-03-16 00:43:09 -0400 | |
| commit | bdf2da4ee811790014f900b165720c983dbf0b65 (patch) | |
| tree | ab2de1c608f4860af3d75863f9a5a766e09e6710 /src/core/hle/kernel/scheduler.cpp | |
| parent | Merge pull request #2237 from bunnei/cache-host-addr (diff) | |
| parent | kernel/thread: Move thread exiting logic from ExitCurrentThread to svcExitThread (diff) | |
| download | yuzu-bdf2da4ee811790014f900b165720c983dbf0b65.tar.gz yuzu-bdf2da4ee811790014f900b165720c983dbf0b65.tar.xz yuzu-bdf2da4ee811790014f900b165720c983dbf0b65.zip | |
Merge pull request #2242 from lioncash/thread-fn
kernel/thread: Remove WaitCurrentThread_Sleep() and ExitCurrentThread()
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
| -rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 5fccfd9f4..e524509df 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp | |||
| @@ -199,8 +199,7 @@ void Scheduler::YieldWithoutLoadBalancing(Thread* thread) { | |||
| 199 | ASSERT(thread->GetPriority() < THREADPRIO_COUNT); | 199 | ASSERT(thread->GetPriority() < THREADPRIO_COUNT); |
| 200 | 200 | ||
| 201 | // Yield this thread -- sleep for zero time and force reschedule to different thread | 201 | // Yield this thread -- sleep for zero time and force reschedule to different thread |
| 202 | WaitCurrentThread_Sleep(); | 202 | GetCurrentThread()->Sleep(0); |
| 203 | GetCurrentThread()->WakeAfterDelay(0); | ||
| 204 | } | 203 | } |
| 205 | 204 | ||
| 206 | void Scheduler::YieldWithLoadBalancing(Thread* thread) { | 205 | void Scheduler::YieldWithLoadBalancing(Thread* thread) { |
| @@ -215,8 +214,7 @@ void Scheduler::YieldWithLoadBalancing(Thread* thread) { | |||
| 215 | ASSERT(priority < THREADPRIO_COUNT); | 214 | ASSERT(priority < THREADPRIO_COUNT); |
| 216 | 215 | ||
| 217 | // Sleep for zero time to be able to force reschedule to different thread | 216 | // Sleep for zero time to be able to force reschedule to different thread |
| 218 | WaitCurrentThread_Sleep(); | 217 | GetCurrentThread()->Sleep(0); |
| 219 | GetCurrentThread()->WakeAfterDelay(0); | ||
| 220 | 218 | ||
| 221 | Thread* suggested_thread = nullptr; | 219 | Thread* suggested_thread = nullptr; |
| 222 | 220 | ||