lib/thread: Add thread_yield helper method
This helper method is just a shorthand for `thread_yield_microseconds(0)`. I think it makes it clear that we want to yield a thread without delaying. BUG=b:179699789 TEST=build test Suggested-by: Julius Werner <jwerner@chromium.org> Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: Id8b60c35b183cff6871d7ba70b36eb33b136c735 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56349 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						
						Martin Roth
					
				
			
			
				
	
			
			
			
						parent
						
							d373d5d92f
						
					
				
				
					commit
					d5dca21a95
				
			@@ -332,6 +332,11 @@ int thread_run_until(void (*func)(void *), void *arg,
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int thread_yield(void)
 | 
			
		||||
{
 | 
			
		||||
	return thread_yield_microseconds(0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int thread_yield_microseconds(unsigned int microsecs)
 | 
			
		||||
{
 | 
			
		||||
	struct thread *current;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user