summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/thread.h')
-rw-r--r--src/core/hle/kernel/thread.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index e0a3c0934..1d2da6d50 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -4,6 +4,7 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <memory>
7#include <string> 8#include <string>
8#include <unordered_map> 9#include <unordered_map>
9#include <vector> 10#include <vector>
@@ -56,6 +57,7 @@ enum class ThreadWakeupReason {
56namespace Kernel { 57namespace Kernel {
57 58
58class Process; 59class Process;
60class Scheduler;
59 61
60class Thread final : public WaitObject { 62class Thread final : public WaitObject {
61public: 63public:
@@ -118,6 +120,9 @@ public:
118 /// Recalculates the current priority taking into account priority inheritance. 120 /// Recalculates the current priority taking into account priority inheritance.
119 void UpdatePriority(); 121 void UpdatePriority();
120 122
123 /// Changes the core that the thread is running or scheduled to run on.
124 void ChangeCore(u32 core, u64 mask);
125
121 /** 126 /**
122 * Gets the thread's thread ID 127 * Gets the thread's thread ID
123 * @return The thread's ID 128 * @return The thread's ID
@@ -240,6 +245,11 @@ public:
240 // available. In case of a timeout, the object will be nullptr. 245 // available. In case of a timeout, the object will be nullptr.
241 std::function<WakeupCallback> wakeup_callback; 246 std::function<WakeupCallback> wakeup_callback;
242 247
248 std::shared_ptr<Scheduler> scheduler;
249
250 u32 ideal_core{0xFFFFFFFF};
251 u64 affinity_mask{0x1};
252
243private: 253private:
244 Thread(); 254 Thread();
245 ~Thread() override; 255 ~Thread() override;