diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index d9e610272..e6bb7c666 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -250,6 +250,7 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(Core::System& system, ThreadTy | |||
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | void Thread::SetPriority(u32 priority) { | 252 | void Thread::SetPriority(u32 priority) { |
| 253 | SchedulerLock lock(kernel); | ||
| 253 | ASSERT_MSG(priority <= THREADPRIO_LOWEST && priority >= THREADPRIO_HIGHEST, | 254 | ASSERT_MSG(priority <= THREADPRIO_LOWEST && priority >= THREADPRIO_HIGHEST, |
| 254 | "Invalid priority value."); | 255 | "Invalid priority value."); |
| 255 | nominal_priority = priority; | 256 | nominal_priority = priority; |
| @@ -383,10 +384,6 @@ void Thread::UpdatePriority() { | |||
| 383 | lock_owner->UpdatePriority(); | 384 | lock_owner->UpdatePriority(); |
| 384 | } | 385 | } |
| 385 | 386 | ||
| 386 | void Thread::ChangeCore(u32 core, u64 mask) { | ||
| 387 | SetCoreAndAffinityMask(core, mask); | ||
| 388 | } | ||
| 389 | |||
| 390 | bool Thread::AllSynchronizationObjectsReady() const { | 387 | bool Thread::AllSynchronizationObjectsReady() const { |
| 391 | return std::none_of(wait_objects.begin(), wait_objects.end(), | 388 | return std::none_of(wait_objects.begin(), wait_objects.end(), |
| 392 | [this](const std::shared_ptr<SynchronizationObject>& object) { | 389 | [this](const std::shared_ptr<SynchronizationObject>& object) { |
| @@ -467,6 +464,7 @@ void Thread::SetCurrentPriority(u32 new_priority) { | |||
| 467 | } | 464 | } |
| 468 | 465 | ||
| 469 | ResultCode Thread::SetCoreAndAffinityMask(s32 new_core, u64 new_affinity_mask) { | 466 | ResultCode Thread::SetCoreAndAffinityMask(s32 new_core, u64 new_affinity_mask) { |
| 467 | SchedulerLock lock(kernel); | ||
| 470 | const auto HighestSetCore = [](u64 mask, u32 max_cores) { | 468 | const auto HighestSetCore = [](u64 mask, u32 max_cores) { |
| 471 | for (s32 core = static_cast<s32>(max_cores - 1); core >= 0; core--) { | 469 | for (s32 core = static_cast<s32>(max_cores - 1); core >= 0; core--) { |
| 472 | if (((mask >> core) & 1) != 0) { | 470 | if (((mask >> core) & 1) != 0) { |