summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-10-12 10:13:25 -0400
committerGravatar FernandoS272019-10-15 11:55:25 -0400
commit3073615dbc214a53badc88da68eecbaaa73898de (patch)
tree78926945e9c645bbcdebfba7dc3d216678dae547 /src/core/hle/kernel/svc.cpp
parentKernel Scheduler: Make sure the global scheduler shutdowns correctly. (diff)
downloadyuzu-3073615dbc214a53badc88da68eecbaaa73898de.tar.gz
yuzu-3073615dbc214a53badc88da68eecbaaa73898de.tar.xz
yuzu-3073615dbc214a53badc88da68eecbaaa73898de.zip
Kernel: Address Feedback.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 151acf33a..f64236be1 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1556,18 +1556,18 @@ static void SleepThread(Core::System& system, s64 nanoseconds) {
1556 1556
1557 auto& scheduler = system.CurrentScheduler(); 1557 auto& scheduler = system.CurrentScheduler();
1558 auto* const current_thread = scheduler.GetCurrentThread(); 1558 auto* const current_thread = scheduler.GetCurrentThread();
1559 bool redundant = false; 1559 bool is_redundant = false;
1560 1560
1561 if (nanoseconds <= 0) { 1561 if (nanoseconds <= 0) {
1562 switch (static_cast<SleepType>(nanoseconds)) { 1562 switch (static_cast<SleepType>(nanoseconds)) {
1563 case SleepType::YieldWithoutLoadBalancing: 1563 case SleepType::YieldWithoutLoadBalancing:
1564 redundant = current_thread->YieldSimple(); 1564 is_redundant = current_thread->YieldSimple();
1565 break; 1565 break;
1566 case SleepType::YieldWithLoadBalancing: 1566 case SleepType::YieldWithLoadBalancing:
1567 redundant = current_thread->YieldAndBalanceLoad(); 1567 is_redundant = current_thread->YieldAndBalanceLoad();
1568 break; 1568 break;
1569 case SleepType::YieldAndWaitForLoadBalancing: 1569 case SleepType::YieldAndWaitForLoadBalancing:
1570 redundant = current_thread->YieldAndWaitForLoadBalancing(); 1570 is_redundant = current_thread->YieldAndWaitForLoadBalancing();
1571 break; 1571 break;
1572 default: 1572 default:
1573 UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds); 1573 UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds);
@@ -1576,9 +1576,9 @@ static void SleepThread(Core::System& system, s64 nanoseconds) {
1576 current_thread->Sleep(nanoseconds); 1576 current_thread->Sleep(nanoseconds);
1577 } 1577 }
1578 1578
1579 if (redundant) { 1579 if (is_redundant) {
1580 // If it's redundant, the core is pretty much idle. Some games keep idling 1580 // If it's redundant, the core is pretty much idle. Some games keep idling
1581 // a core while it's doing nothing, we advance timing to avoid costly continuos 1581 // a core while it's doing nothing, we advance timing to avoid costly continuous
1582 // calls. 1582 // calls.
1583 system.CoreTiming().AddTicks(2000); 1583 system.CoreTiming().AddTicks(2000);
1584 } 1584 }