forked from eden-emu/eden
		
	core: cpu_manager: Use invalid core_id on init and simplify shutdown.
This commit is contained in:
		
							parent
							
								
									5892c23e30
								
							
						
					
					
						commit
						6fd0256f77
					
				
					 1 changed files with 3 additions and 7 deletions
				
			
		|  | @ -32,7 +32,7 @@ void CpuManager::Initialize() { | |||
|             core_data[core].host_thread = std::jthread(ThreadStart, std::ref(*this), core); | ||||
|         } | ||||
|     } else { | ||||
|         core_data[0].host_thread = std::jthread(ThreadStart, std::ref(*this), 0); | ||||
|         core_data[0].host_thread = std::jthread(ThreadStart, std::ref(*this), -1); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | @ -347,13 +347,9 @@ void CpuManager::RunThread(std::stop_token stop_token, std::size_t core) { | |||
|             sc_sync_first_use = false; | ||||
|         } | ||||
| 
 | ||||
|         // Abort if emulation was killed before the session really starts
 | ||||
|         if (!system.IsPoweredOn()) { | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         // Emulation was stopped
 | ||||
|         if (stop_token.stop_requested()) { | ||||
|             break; | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         auto current_thread = system.Kernel().CurrentScheduler()->GetCurrentThread(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bunnei
						bunnei