lib/thread: Rename thread_cooperate and thread_prevent_coop
Renaming them to thread_coop_disable()/thread_coop_enable() makes them sound like a pair. BUG=b:179699789 TEST=Boot guybrush to OS Suggested-by: Julius Werner <jwerner@chromium.org> Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I1d70c18965f53e733e871ca03107270612efa4fc Reviewed-on: https://review.coreboot.org/c/coreboot/+/56357 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						
						Raul Rangel
					
				
			
			
				
	
			
			
			
						parent
						
							be60a0ddb0
						
					
				
				
					commit
					9ba36abdc5
				
			@@ -114,7 +114,7 @@ static inline void free_thread(struct thread *t)
 | 
			
		||||
static void idle_thread(void *unused)
 | 
			
		||||
{
 | 
			
		||||
	/* This thread never voluntarily yields. */
 | 
			
		||||
	thread_prevent_coop();
 | 
			
		||||
	thread_coop_disable();
 | 
			
		||||
	while (1)
 | 
			
		||||
		timers_run();
 | 
			
		||||
}
 | 
			
		||||
@@ -352,7 +352,7 @@ int thread_yield_microseconds(unsigned int microsecs)
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void thread_cooperate(void)
 | 
			
		||||
void thread_coop_enable(void)
 | 
			
		||||
{
 | 
			
		||||
	struct thread *current;
 | 
			
		||||
 | 
			
		||||
@@ -366,7 +366,7 @@ void thread_cooperate(void)
 | 
			
		||||
	current->can_yield++;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void thread_prevent_coop(void)
 | 
			
		||||
void thread_coop_disable(void)
 | 
			
		||||
{
 | 
			
		||||
	struct thread *current;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user