mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Merge pull request #957 from Subv/hwtest_crash
Kernel/Scheduling: Clean up a thread's wait_objects when its scheduled.
This commit is contained in:
		
						commit
						dcc8f1bef2
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -217,6 +217,14 @@ static void SwitchContext(Thread* new_thread) { | |||
|             new_thread->context.pc -= thumb_mode ? 2 : 4; | ||||
|         } | ||||
| 
 | ||||
|         // Clean up the thread's wait_objects, they'll be restored if needed during
 | ||||
|         // the svcWaitSynchronization call
 | ||||
|         for (int i = 0; i < new_thread->wait_objects.size(); ++i) { | ||||
|             SharedPtr<WaitObject> object = new_thread->wait_objects[i]; | ||||
|             object->RemoveWaitingThread(new_thread); | ||||
|         } | ||||
|         new_thread->wait_objects.clear(); | ||||
| 
 | ||||
|         ready_queue.remove(new_thread->current_priority, new_thread); | ||||
|         new_thread->status = THREADSTATUS_RUNNING; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue