diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-04 00:32:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-04 00:32:45 +0100 |
commit | 69aaad9b9684570284efcdb5921e54d0f5983838 (patch) | |
tree | 364256228dfcdfc989a597aca2a6c753b173f93a /src/core/hle/kernel/thread.cpp | |
parent | Merge pull request #5059 from lioncash/mouse (diff) | |
parent | kernel: scheduler: Minor cleanup to remove duplicated code. (diff) | |
download | yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.tar yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.tar.gz yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.tar.bz2 yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.tar.lz yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.tar.xz yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.tar.zst yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.zip |
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index da0cb26b6..7d1eb2c6e 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -12,7 +12,6 @@ #include "common/fiber.h" #include "common/logging/log.h" #include "common/thread_queue_list.h" -#include "core/arm/arm_interface.h" #include "core/core.h" #include "core/cpu_manager.h" #include "core/hardware_properties.h" @@ -62,7 +61,6 @@ void Thread::Stop() { // Mark the TLS slot in the thread's page as free. owner_process->FreeTLSRegion(tls_address); } - arm_interface.reset(); has_exited = true; } global_handle = 0; @@ -90,10 +88,6 @@ void Thread::ResumeFromWait() { // before actually resuming. We can ignore subsequent wakeups if the thread status has // already been set to ThreadStatus::Ready. return; - - case ThreadStatus::Running: - DEBUG_ASSERT_MSG(false, "Thread with object id {} has already resumed.", GetObjectId()); - return; case ThreadStatus::Dead: // This should never happen, as threads must complete before being stopped. DEBUG_ASSERT_MSG(false, "Thread with object id {} cannot be resumed because it's DEAD.", @@ -217,22 +211,9 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(Core::System& system, ThreadTy thread->tls_address = 0; } - thread->arm_interface.reset(); + // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used + // to initialize the context if ((type_flags & THREADTYPE_HLE) == 0) { -#ifdef ARCHITECTURE_x86_64 - if (owner_process && !owner_process->Is64BitProcess()) { - thread->arm_interface = std::make_unique<Core::ARM_Dynarmic_32>( - system, kernel.Interrupts(), kernel.IsMulticore(), kernel.GetExclusiveMonitor(), - processor_id); - } else { - thread->arm_interface = std::make_unique<Core::ARM_Dynarmic_64>( - system, kernel.Interrupts(), kernel.IsMulticore(), kernel.GetExclusiveMonitor(), - processor_id); - } -#else -#error Platform not supported yet. -#endif - ResetThreadContext32(thread->context_32, static_cast<u32>(stack_top), static_cast<u32>(entry_point), static_cast<u32>(arg)); ResetThreadContext64(thread->context_64, stack_top, entry_point, arg); @@ -268,14 +249,6 @@ VAddr Thread::GetCommandBufferAddress() const { return GetTLSAddress() + command_header_offset; } -Core::ARM_Interface& Thread::ArmInterface() { - return *arm_interface; -} - -const Core::ARM_Interface& Thread::ArmInterface() const { - return *arm_interface; -} - void Thread::SetStatus(ThreadStatus new_status) { if (new_status == status) { return; @@ -283,7 +256,6 @@ void Thread::SetStatus(ThreadStatus new_status) { switch (new_status) { case ThreadStatus::Ready: - case ThreadStatus::Running: SetSchedulingStatus(ThreadSchedStatus::Runnable); break; case ThreadStatus::Dormant: |