diff options
| author | 2018-05-11 12:59:23 -0400 | |
|---|---|---|
| committer | 2018-05-11 12:59:23 -0400 | |
| commit | 1b5c02fc37206bbd33715d2dde6258c3f835581c (patch) | |
| tree | 1c33c66e734ff55228e4293cd2720070cd467080 /src/core/hle/kernel/thread.h | |
| parent | Merge pull request #439 from ogniK5377/GetTPCMasks (diff) | |
| parent | core: Add several missing docstrings. (diff) | |
| download | yuzu-1b5c02fc37206bbd33715d2dde6258c3f835581c.tar.gz yuzu-1b5c02fc37206bbd33715d2dde6258c3f835581c.tar.xz yuzu-1b5c02fc37206bbd33715d2dde6258c3f835581c.zip | |
Merge pull request #436 from bunnei/multi-core
Initial support for multi-core
Diffstat (limited to 'src/core/hle/kernel/thread.h')
| -rw-r--r-- | src/core/hle/kernel/thread.h | 10 |
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 { | |||
| 56 | namespace Kernel { | 57 | namespace Kernel { |
| 57 | 58 | ||
| 58 | class Process; | 59 | class Process; |
| 60 | class Scheduler; | ||
| 59 | 61 | ||
| 60 | class Thread final : public WaitObject { | 62 | class Thread final : public WaitObject { |
| 61 | public: | 63 | public: |
| @@ -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 | |||
| 243 | private: | 253 | private: |
| 244 | Thread(); | 254 | Thread(); |
| 245 | ~Thread() override; | 255 | ~Thread() override; |