summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-10 18:13:39 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:45 +0200
commitd494b074e8afd3aff7b65afc7b977496be06ccc9 (patch)
tree002cc29d32a9b1e44e61fb1aae122715556b36c5 /src/core/hle/kernel/thread.h
parentCPU_Manager: Unload/Reload threads on preemption on SingleCore (diff)
downloadyuzu-d494b074e8afd3aff7b65afc7b977496be06ccc9.tar
yuzu-d494b074e8afd3aff7b65afc7b977496be06ccc9.tar.gz
yuzu-d494b074e8afd3aff7b65afc7b977496be06ccc9.tar.bz2
yuzu-d494b074e8afd3aff7b65afc7b977496be06ccc9.tar.lz
yuzu-d494b074e8afd3aff7b65afc7b977496be06ccc9.tar.xz
yuzu-d494b074e8afd3aff7b65afc7b977496be06ccc9.tar.zst
yuzu-d494b074e8afd3aff7b65afc7b977496be06ccc9.zip
Diffstat (limited to 'src/core/hle/kernel/thread.h')
-rw-r--r--src/core/hle/kernel/thread.h9
1 files changed, 5 insertions, 4 deletions
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 <functional>
#include <string>
+#include <utility>
#include <vector>
#include "common/common_types.h"
@@ -503,13 +504,13 @@ public:
ResultCode Sleep(s64 nanoseconds);
/// Yields this thread without rebalancing loads.
- ResultCode YieldSimple();
+ std::pair<ResultCode, bool> YieldSimple();
/// Yields this thread and does a load rebalancing.
- ResultCode YieldAndBalanceLoad();
+ std::pair<ResultCode, bool> YieldAndBalanceLoad();
/// Yields this thread and if the core is left idle, loads are rebalanced
- ResultCode YieldAndWaitForLoadBalancing();
+ std::pair<ResultCode, bool> YieldAndWaitForLoadBalancing();
void IncrementYieldCount() {
yield_count++;
@@ -587,7 +588,7 @@ private:
ThreadContext32 context_32{};
ThreadContext64 context_64{};
Common::SpinLock context_guard{};
- std::shared_ptr<Common::Fiber> host_context{};
+ std::shared_ptr<Common::Fiber> host_context{};
u64 thread_id = 0;