diff options
| author | bunnei <bunneidev@gmail.com> | 2018-05-11 12:59:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-11 12:59:23 -0400 |
| commit | 1b5c02fc37206bbd33715d2dde6258c3f835581c (patch) | |
| tree | 1c33c66e734ff55228e4293cd2720070cd467080 /src/core/hle/kernel/thread.h | |
| parent | e07218906d4eedbfae5e4b82aca460eec2808472 (diff) | |
| parent | 811dae12f9e1c0eb5c19f6c6a8e75b1e6260abb2 (diff) | |
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 @@ #pragma once +#include <memory> #include <string> #include <unordered_map> #include <vector> @@ -56,6 +57,7 @@ enum class ThreadWakeupReason { namespace Kernel { class Process; +class Scheduler; class Thread final : public WaitObject { public: @@ -118,6 +120,9 @@ public: /// Recalculates the current priority taking into account priority inheritance. void UpdatePriority(); + /// Changes the core that the thread is running or scheduled to run on. + void ChangeCore(u32 core, u64 mask); + /** * Gets the thread's thread ID * @return The thread's ID @@ -240,6 +245,11 @@ public: // available. In case of a timeout, the object will be nullptr. std::function<WakeupCallback> wakeup_callback; + std::shared_ptr<Scheduler> scheduler; + + u32 ideal_core{0xFFFFFFFF}; + u64 affinity_mask{0x1}; + private: Thread(); ~Thread() override; |
