summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2020-07-15 13:13:31 -0400
committerGravatar Lioncash2020-07-15 13:28:05 -0400
commit4ad69ca96e747c2ed23edf7f35c5fedda28b2008 (patch)
tree113da68e222da4ff4276e8f307e00b57a7eacb99 /src/core/hle/kernel/thread.cpp
parentMerge pull request #4342 from lioncash/endian (diff)
downloadyuzu-4ad69ca96e747c2ed23edf7f35c5fedda28b2008.tar.gz
yuzu-4ad69ca96e747c2ed23edf7f35c5fedda28b2008.tar.xz
yuzu-4ad69ca96e747c2ed23edf7f35c5fedda28b2008.zip
kernel/thread: Remove global GetCurrentThread()
This is only used in one place, so we can fold it into the calling code, eliminating a place for the global system instance to be used.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 2b1092697..67148fa6d 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -13,16 +13,8 @@
13#include "common/logging/log.h" 13#include "common/logging/log.h"
14#include "common/thread_queue_list.h" 14#include "common/thread_queue_list.h"
15#include "core/arm/arm_interface.h" 15#include "core/arm/arm_interface.h"
16#ifdef ARCHITECTURE_x86_64
17#include "core/arm/dynarmic/arm_dynarmic_32.h"
18#include "core/arm/dynarmic/arm_dynarmic_64.h"
19#endif
20#include "core/arm/cpu_interrupt_handler.h"
21#include "core/arm/exclusive_monitor.h"
22#include "core/arm/unicorn/arm_unicorn.h" 16#include "core/arm/unicorn/arm_unicorn.h"
23#include "core/core.h" 17#include "core/core.h"
24#include "core/core_timing.h"
25#include "core/core_timing_util.h"
26#include "core/cpu_manager.h" 18#include "core/cpu_manager.h"
27#include "core/hardware_properties.h" 19#include "core/hardware_properties.h"
28#include "core/hle/kernel/errors.h" 20#include "core/hle/kernel/errors.h"
@@ -36,6 +28,11 @@
36#include "core/hle/result.h" 28#include "core/hle/result.h"
37#include "core/memory.h" 29#include "core/memory.h"
38 30
31#ifdef ARCHITECTURE_x86_64
32#include "core/arm/dynarmic/arm_dynarmic_32.h"
33#include "core/arm/dynarmic/arm_dynarmic_64.h"
34#endif
35
39namespace Kernel { 36namespace Kernel {
40 37
41bool Thread::ShouldWait(const Thread* thread) const { 38bool Thread::ShouldWait(const Thread* thread) const {
@@ -540,13 +537,4 @@ ResultCode Thread::SetCoreAndAffinityMask(s32 new_core, u64 new_affinity_mask) {
540 return RESULT_SUCCESS; 537 return RESULT_SUCCESS;
541} 538}
542 539
543////////////////////////////////////////////////////////////////////////////////////////////////////
544
545/**
546 * Gets the current thread
547 */
548Thread* GetCurrentThread() {
549 return Core::System::GetInstance().CurrentScheduler().GetCurrentThread();
550}
551
552} // namespace Kernel 540} // namespace Kernel