diff options
Diffstat (limited to 'src/core/cpu_manager.cpp')
| -rw-r--r-- | src/core/cpu_manager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index 151eb3870..7a5c22f78 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp | |||
| @@ -73,12 +73,13 @@ void CpuManager::HandleInterrupt() { | |||
| 73 | void CpuManager::MultiCoreRunGuestThread() { | 73 | void CpuManager::MultiCoreRunGuestThread() { |
| 74 | // Similar to UserModeThreadStarter in HOS | 74 | // Similar to UserModeThreadStarter in HOS |
| 75 | auto& kernel = system.Kernel(); | 75 | auto& kernel = system.Kernel(); |
| 76 | auto* thread = Kernel::GetCurrentThreadPointer(kernel); | ||
| 76 | kernel.CurrentScheduler()->OnThreadStart(); | 77 | kernel.CurrentScheduler()->OnThreadStart(); |
| 77 | 78 | ||
| 78 | while (true) { | 79 | while (true) { |
| 79 | auto* physical_core = &kernel.CurrentPhysicalCore(); | 80 | auto* physical_core = &kernel.CurrentPhysicalCore(); |
| 80 | while (!physical_core->IsInterrupted()) { | 81 | while (!physical_core->IsInterrupted()) { |
| 81 | physical_core->Run(); | 82 | physical_core->RunThread(thread); |
| 82 | physical_core = &kernel.CurrentPhysicalCore(); | 83 | physical_core = &kernel.CurrentPhysicalCore(); |
| 83 | } | 84 | } |
| 84 | 85 | ||
| @@ -110,12 +111,13 @@ void CpuManager::MultiCoreRunIdleThread() { | |||
| 110 | 111 | ||
| 111 | void CpuManager::SingleCoreRunGuestThread() { | 112 | void CpuManager::SingleCoreRunGuestThread() { |
| 112 | auto& kernel = system.Kernel(); | 113 | auto& kernel = system.Kernel(); |
| 114 | auto* thread = Kernel::GetCurrentThreadPointer(kernel); | ||
| 113 | kernel.CurrentScheduler()->OnThreadStart(); | 115 | kernel.CurrentScheduler()->OnThreadStart(); |
| 114 | 116 | ||
| 115 | while (true) { | 117 | while (true) { |
| 116 | auto* physical_core = &kernel.CurrentPhysicalCore(); | 118 | auto* physical_core = &kernel.CurrentPhysicalCore(); |
| 117 | if (!physical_core->IsInterrupted()) { | 119 | if (!physical_core->IsInterrupted()) { |
| 118 | physical_core->Run(); | 120 | physical_core->RunThread(thread); |
| 119 | physical_core = &kernel.CurrentPhysicalCore(); | 121 | physical_core = &kernel.CurrentPhysicalCore(); |
| 120 | } | 122 | } |
| 121 | 123 | ||
| @@ -211,8 +213,6 @@ void CpuManager::RunThread(std::stop_token token, std::size_t core) { | |||
| 211 | system.GPU().ObtainContext(); | 213 | system.GPU().ObtainContext(); |
| 212 | } | 214 | } |
| 213 | 215 | ||
| 214 | system.ArmInterface(core).Initialize(); | ||
| 215 | |||
| 216 | auto& kernel = system.Kernel(); | 216 | auto& kernel = system.Kernel(); |
| 217 | auto& scheduler = *kernel.CurrentScheduler(); | 217 | auto& scheduler = *kernel.CurrentScheduler(); |
| 218 | auto* thread = scheduler.GetSchedulerCurrentThread(); | 218 | auto* thread = scheduler.GetSchedulerCurrentThread(); |