aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_process.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-11-10 23:02:45 -0800
committerbunnei <bunneidev@gmail.com>2021-12-06 16:39:17 -0800
commit316a2dd22a25e4cfb31b364ab6595d8bb054411c (patch)
tree3d5077bf251a5bd0d08b9ae3d014b0742475c876 /src/core/hle/kernel/k_process.h
parent4c747611555068817f76e72b2cb9c7af99480d12 (diff)
hle: kernel: KProcess: Improvements for thread pinning.
Diffstat (limited to 'src/core/hle/kernel/k_process.h')
-rw-r--r--src/core/hle/kernel/k_process.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h
index 8a8c1fcbb..d972c9de0 100644
--- a/src/core/hle/kernel/k_process.h
+++ b/src/core/hle/kernel/k_process.h
@@ -259,7 +259,7 @@ public:
[[nodiscard]] KThread* GetPinnedThread(s32 core_id) const {
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
- return pinned_threads[core_id];
+ return pinned_threads.at(core_id);
}
/// Gets 8 bytes of random data for svcGetInfo RandomEntropy
@@ -347,6 +347,7 @@ public:
void PinCurrentThread();
void UnpinCurrentThread();
+ void UnpinThread(KThread* thread);
KLightLock& GetStateLock() {
return state_lock;
@@ -368,14 +369,14 @@ private:
void PinThread(s32 core_id, KThread* thread) {
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
ASSERT(thread != nullptr);
- ASSERT(pinned_threads[core_id] == nullptr);
+ ASSERT(pinned_threads.at(core_id) == nullptr);
pinned_threads[core_id] = thread;
}
void UnpinThread(s32 core_id, KThread* thread) {
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
ASSERT(thread != nullptr);
- ASSERT(pinned_threads[core_id] == thread);
+ ASSERT(pinned_threads.at(core_id) == thread);
pinned_threads[core_id] = nullptr;
}