mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	kernel/scheduler: Use std::mutex instead of spin lock
Profiling shows that this is a highly contested mutex, causing dimishing results compared to a OS lock. std::mutex implementations can spin for a while before falling back to an OS lock. This avoids wasting precious CPU cycles in a no-op.
This commit is contained in:
		
							parent
							
								
									f1d8c83e1c
								
							
						
					
					
						commit
						9b38f4fc55
					
				@ -188,7 +188,7 @@ private:
 | 
			
		||||
 | 
			
		||||
    /// Scheduler lock mechanisms.
 | 
			
		||||
    bool is_locked{};
 | 
			
		||||
    Common::SpinLock inner_lock{};
 | 
			
		||||
    std::mutex inner_lock;
 | 
			
		||||
    std::atomic<s64> scope_lock{};
 | 
			
		||||
    Core::EmuThreadHandle current_owner{Core::EmuThreadHandle::InvalidHandle()};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user