mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
hle: kernel k_process: Remove unnecessary .at usage with thread pinning methods.
This commit is contained in:
parent
834c25f4d9
commit
9a9e7dd78b
@ -259,7 +259,7 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] KThread* GetPinnedThread(s32 core_id) const {
|
[[nodiscard]] KThread* GetPinnedThread(s32 core_id) const {
|
||||||
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
|
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
|
||||||
return pinned_threads.at(core_id);
|
return pinned_threads[core_id];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets 8 bytes of random data for svcGetInfo RandomEntropy
|
/// Gets 8 bytes of random data for svcGetInfo RandomEntropy
|
||||||
@ -369,14 +369,14 @@ private:
|
|||||||
void PinThread(s32 core_id, KThread* thread) {
|
void PinThread(s32 core_id, KThread* thread) {
|
||||||
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
|
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
|
||||||
ASSERT(thread != nullptr);
|
ASSERT(thread != nullptr);
|
||||||
ASSERT(pinned_threads.at(core_id) == nullptr);
|
ASSERT(pinned_threads[core_id] == nullptr);
|
||||||
pinned_threads[core_id] = thread;
|
pinned_threads[core_id] = thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnpinThread(s32 core_id, KThread* thread) {
|
void UnpinThread(s32 core_id, KThread* thread) {
|
||||||
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
|
ASSERT(0 <= core_id && core_id < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
|
||||||
ASSERT(thread != nullptr);
|
ASSERT(thread != nullptr);
|
||||||
ASSERT(pinned_threads.at(core_id) == thread);
|
ASSERT(pinned_threads[core_id] == thread);
|
||||||
pinned_threads[core_id] = nullptr;
|
pinned_threads[core_id] = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user