mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Threading: Reworked the way our scheduler works.
Threads will now be awakened when the objects they're waiting on are signaled, instead of repeating the WaitSynchronization call every now and then. The scheduler is now called once after every SVC call, and once after a thread is awakened from sleep by its timeout callback. This new implementation is based off reverse-engineering of the real kernel. See https://gist.github.com/Subv/02f29bd9f1e5deb7aceea1e8f019c8f4 for a more detailed description of how the real kernel handles rescheduling.
This commit is contained in:
		
							parent
							
								
									0423a38ab5
								
							
						
					
					
						commit
						8634b8cb83
					
				
					 8 changed files with 189 additions and 199 deletions
				
			
		|  | @ -230,7 +230,7 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const { | |||
|         list.push_back(std::make_unique<WaitTreeMutexList>(thread.held_mutexes)); | ||||
|     } | ||||
|     if (thread.status == THREADSTATUS_WAIT_SYNCH) { | ||||
|         list.push_back(std::make_unique<WaitTreeObjectList>(thread.wait_objects, thread.wait_all)); | ||||
|         list.push_back(std::make_unique<WaitTreeObjectList>(thread.wait_objects, !thread.wait_objects.empty())); | ||||
|     } | ||||
| 
 | ||||
|     return list; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue