mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Kernel: Use different thread statuses when a thread calls WaitSynchronization1 and WaitSynchronizationN with wait_all = true.
This commit removes the overly general THREADSTATUS_WAIT_SYNCH and replaces it with two more granular statuses: THREADSTATUS_WAIT_SYNCH_ANY when a thread waits on objects via WaitSynchronization1 or WaitSynchronizationN with wait_all = false. THREADSTATUS_WAIT_SYNCH_ALL when a thread waits on objects via WaitSynchronizationN with wait_all = true.
This commit is contained in:
		
							parent
							
								
									d3ff5b91e1
								
							
						
					
					
						commit
						cef5f45de2
					
				
					 4 changed files with 26 additions and 19 deletions
				
			
		|  | @ -153,7 +153,8 @@ QString WaitTreeThread::GetText() const { | |||
|     case THREADSTATUS_WAIT_SLEEP: | ||||
|         status = tr("sleeping"); | ||||
|         break; | ||||
|     case THREADSTATUS_WAIT_SYNCH: | ||||
|     case THREADSTATUS_WAIT_SYNCH_ALL: | ||||
|     case THREADSTATUS_WAIT_SYNCH_ANY: | ||||
|         status = tr("waiting for objects"); | ||||
|         break; | ||||
|     case THREADSTATUS_DORMANT: | ||||
|  | @ -180,7 +181,8 @@ QColor WaitTreeThread::GetColor() const { | |||
|         return QColor(Qt::GlobalColor::darkRed); | ||||
|     case THREADSTATUS_WAIT_SLEEP: | ||||
|         return QColor(Qt::GlobalColor::darkYellow); | ||||
|     case THREADSTATUS_WAIT_SYNCH: | ||||
|     case THREADSTATUS_WAIT_SYNCH_ALL: | ||||
|     case THREADSTATUS_WAIT_SYNCH_ANY: | ||||
|         return QColor(Qt::GlobalColor::red); | ||||
|     case THREADSTATUS_DORMANT: | ||||
|         return QColor(Qt::GlobalColor::darkCyan); | ||||
|  | @ -228,7 +230,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const { | |||
|     } else { | ||||
|         list.push_back(std::make_unique<WaitTreeMutexList>(thread.held_mutexes)); | ||||
|     } | ||||
|     if (thread.status == THREADSTATUS_WAIT_SYNCH) { | ||||
|     if (thread.status == THREADSTATUS_WAIT_SYNCH_ANY || | ||||
|         thread.status == THREADSTATUS_WAIT_SYNCH_ALL) { | ||||
|         list.push_back(std::make_unique<WaitTreeObjectList>(thread.wait_objects, | ||||
|                                                             thread.IsSleepingOnWaitAll())); | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue