diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index da0cb26b6..3abe12810 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include "common/fiber.h" | 12 | #include "common/fiber.h" |
| 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" | ||
| 16 | #include "core/core.h" | 15 | #include "core/core.h" |
| 17 | #include "core/cpu_manager.h" | 16 | #include "core/cpu_manager.h" |
| 18 | #include "core/hardware_properties.h" | 17 | #include "core/hardware_properties.h" |
| @@ -62,7 +61,6 @@ void Thread::Stop() { | |||
| 62 | // Mark the TLS slot in the thread's page as free. | 61 | // Mark the TLS slot in the thread's page as free. |
| 63 | owner_process->FreeTLSRegion(tls_address); | 62 | owner_process->FreeTLSRegion(tls_address); |
| 64 | } | 63 | } |
| 65 | arm_interface.reset(); | ||
| 66 | has_exited = true; | 64 | has_exited = true; |
| 67 | } | 65 | } |
| 68 | global_handle = 0; | 66 | global_handle = 0; |
| @@ -217,22 +215,9 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(Core::System& system, ThreadTy | |||
| 217 | thread->tls_address = 0; | 215 | thread->tls_address = 0; |
| 218 | } | 216 | } |
| 219 | 217 | ||
| 220 | thread->arm_interface.reset(); | 218 | // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used |
| 219 | // to initialize the context | ||
| 221 | if ((type_flags & THREADTYPE_HLE) == 0) { | 220 | if ((type_flags & THREADTYPE_HLE) == 0) { |
| 222 | #ifdef ARCHITECTURE_x86_64 | ||
| 223 | if (owner_process && !owner_process->Is64BitProcess()) { | ||
| 224 | thread->arm_interface = std::make_unique<Core::ARM_Dynarmic_32>( | ||
| 225 | system, kernel.Interrupts(), kernel.IsMulticore(), kernel.GetExclusiveMonitor(), | ||
| 226 | processor_id); | ||
| 227 | } else { | ||
| 228 | thread->arm_interface = std::make_unique<Core::ARM_Dynarmic_64>( | ||
| 229 | system, kernel.Interrupts(), kernel.IsMulticore(), kernel.GetExclusiveMonitor(), | ||
| 230 | processor_id); | ||
| 231 | } | ||
| 232 | #else | ||
| 233 | #error Platform not supported yet. | ||
| 234 | #endif | ||
| 235 | |||
| 236 | ResetThreadContext32(thread->context_32, static_cast<u32>(stack_top), | 221 | ResetThreadContext32(thread->context_32, static_cast<u32>(stack_top), |
| 237 | static_cast<u32>(entry_point), static_cast<u32>(arg)); | 222 | static_cast<u32>(entry_point), static_cast<u32>(arg)); |
| 238 | ResetThreadContext64(thread->context_64, stack_top, entry_point, arg); | 223 | ResetThreadContext64(thread->context_64, stack_top, entry_point, arg); |
| @@ -268,14 +253,6 @@ VAddr Thread::GetCommandBufferAddress() const { | |||
| 268 | return GetTLSAddress() + command_header_offset; | 253 | return GetTLSAddress() + command_header_offset; |
| 269 | } | 254 | } |
| 270 | 255 | ||
| 271 | Core::ARM_Interface& Thread::ArmInterface() { | ||
| 272 | return *arm_interface; | ||
| 273 | } | ||
| 274 | |||
| 275 | const Core::ARM_Interface& Thread::ArmInterface() const { | ||
| 276 | return *arm_interface; | ||
| 277 | } | ||
| 278 | |||
| 279 | void Thread::SetStatus(ThreadStatus new_status) { | 256 | void Thread::SetStatus(ThreadStatus new_status) { |
| 280 | if (new_status == status) { | 257 | if (new_status == status) { |
| 281 | return; | 258 | return; |