summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-06-19 09:11:18 -0400
committerGravatar FernandoS272019-10-15 11:55:12 -0400
commit82218c925af8bcbaa05ae9f39af2d2393de7681f (patch)
treee38d90c4838679ae59d58f51fff2904b16b1a155 /src/core/hle/kernel/svc.cpp
parentCorrect PrepareReschedule (diff)
downloadyuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.tar.gz
yuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.tar.xz
yuzu-82218c925af8bcbaa05ae9f39af2d2393de7681f.zip
Kernel: Style and Corrections
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) {
1560 if (nanoseconds <= 0) { 1560 if (nanoseconds <= 0) {
1561 switch (static_cast<SleepType>(nanoseconds)) { 1561 switch (static_cast<SleepType>(nanoseconds)) {
1562 case SleepType::YieldWithoutLoadBalancing: 1562 case SleepType::YieldWithoutLoadBalancing:
1563 current_thread->YieldType0(); 1563 current_thread->YieldSimple();
1564 break; 1564 break;
1565 case SleepType::YieldWithLoadBalancing: 1565 case SleepType::YieldWithLoadBalancing:
1566 current_thread->YieldType1(); 1566 current_thread->YieldAndBalanceLoad();
1567 break; 1567 break;
1568 case SleepType::YieldAndWaitForLoadBalancing: 1568 case SleepType::YieldAndWaitForLoadBalancing:
1569 current_thread->YieldType2(); 1569 current_thread->YieldAndWaitForLoadBalancing();
1570 break; 1570 break;
1571 default: 1571 default:
1572 UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds); 1572 UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds);
@@ -1638,8 +1638,9 @@ static ResultCode SignalProcessWideKey(Core::System& system, VAddr condition_var
1638 const auto& thread_list = scheduler.GetThreadList(); 1638 const auto& thread_list = scheduler.GetThreadList();
1639 1639
1640 for (const auto& thread : thread_list) { 1640 for (const auto& thread : thread_list) {
1641 if (thread->GetCondVarWaitAddress() == condition_variable_addr) 1641 if (thread->GetCondVarWaitAddress() == condition_variable_addr) {
1642 waiting_threads.push_back(thread); 1642 waiting_threads.push_back(thread);
1643 }
1643 } 1644 }
1644 1645
1645 // Sort them by priority, such that the highest priority ones come first. 1646 // 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,
1747 1748
1748 const auto arbitration_type = static_cast<AddressArbiter::ArbitrationType>(type); 1749 const auto arbitration_type = static_cast<AddressArbiter::ArbitrationType>(type);
1749 auto& address_arbiter = system.Kernel().CurrentProcess()->GetAddressArbiter(); 1750 auto& address_arbiter = system.Kernel().CurrentProcess()->GetAddressArbiter();
1750 ResultCode result = address_arbiter.WaitForAddress(address, arbitration_type, value, timeout); 1751 const ResultCode result =
1751 if (result == RESULT_SUCCESS) 1752 address_arbiter.WaitForAddress(address, arbitration_type, value, timeout);
1753 if (result == RESULT_SUCCESS) {
1752 system.PrepareReschedule(); 1754 system.PrepareReschedule();
1755 }
1753 return result; 1756 return result;
1754} 1757}
1755 1758