summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-19 15:11:18 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-10-15 17:55:12 +0200
commit82218c925af8bcbaa05ae9f39af2d2393de7681f (patch)
treee38d90c4838679ae59d58f51fff2904b16b1a155 /src/core/hle/kernel/svc.cpp
parentCorrect PrepareReschedule (diff)
downloadyuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.tar
yuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.tar.gz
yuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.tar.bz2
yuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.tar.lz
yuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.tar.xz
yuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.tar.zst
yuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.zip
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 560ac3945..d520ed033 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1560,13 +1560,13 @@ static void SleepThread(Core::System& system, s64 nanoseconds) {
if (nanoseconds <= 0) {
switch (static_cast<SleepType>(nanoseconds)) {
case SleepType::YieldWithoutLoadBalancing:
- current_thread->YieldType0();
+ current_thread->YieldSimple();
break;
case SleepType::YieldWithLoadBalancing:
- current_thread->YieldType1();
+ current_thread->YieldAndBalanceLoad();
break;
case SleepType::YieldAndWaitForLoadBalancing:
- current_thread->YieldType2();
+ current_thread->YieldAndWaitForLoadBalancing();
break;
default:
UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds);
@@ -1638,8 +1638,9 @@ static ResultCode SignalProcessWideKey(Core::System& system, VAddr condition_var
const auto& thread_list = scheduler.GetThreadList();
for (const auto& thread : thread_list) {
- if (thread->GetCondVarWaitAddress() == condition_variable_addr)
+ if (thread->GetCondVarWaitAddress() == condition_variable_addr) {
waiting_threads.push_back(thread);
+ }
}
// Sort them by priority, such that the highest priority ones come first.
@@ -1747,9 +1748,11 @@ static ResultCode WaitForAddress(Core::System& system, VAddr address, u32 type,
const auto arbitration_type = static_cast<AddressArbiter::ArbitrationType>(type);
auto& address_arbiter = system.Kernel().CurrentProcess()->GetAddressArbiter();
- ResultCode result = address_arbiter.WaitForAddress(address, arbitration_type, value, timeout);
- if (result == RESULT_SUCCESS)
+ const ResultCode result =
+ address_arbiter.WaitForAddress(address, arbitration_type, value, timeout);
+ if (result == RESULT_SUCCESS) {
system.PrepareReschedule();
+ }
return result;
}