From d494b074e8afd3aff7b65afc7b977496be06ccc9 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 10 Mar 2020 13:13:39 -0400 Subject: Kernel: Preempt Single core on redudant yields. --- src/core/hle/kernel/thread.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 953b023b5..9a29875ac 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -6,6 +6,7 @@ #include #include +#include #include #include "common/common_types.h" @@ -503,13 +504,13 @@ public: ResultCode Sleep(s64 nanoseconds); /// Yields this thread without rebalancing loads. - ResultCode YieldSimple(); + std::pair YieldSimple(); /// Yields this thread and does a load rebalancing. - ResultCode YieldAndBalanceLoad(); + std::pair YieldAndBalanceLoad(); /// Yields this thread and if the core is left idle, loads are rebalanced - ResultCode YieldAndWaitForLoadBalancing(); + std::pair YieldAndWaitForLoadBalancing(); void IncrementYieldCount() { yield_count++; @@ -587,7 +588,7 @@ private: ThreadContext32 context_32{}; ThreadContext64 context_64{}; Common::SpinLock context_guard{}; - std::shared_ptr host_context{}; + std::shared_ptr host_context{}; u64 thread_id = 0; -- cgit v1.2.3