Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56357 )
Change subject: lib/thread: Rename thread_cooperate and thread_prevent_coop ......................................................................
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 --- M src/include/thread.h M src/lib/thread.c 2 files changed, 7 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/56357/1
diff --git a/src/include/thread.h b/src/include/thread.h index 8f12343..ee1e277 100644 --- a/src/include/thread.h +++ b/src/include/thread.h @@ -50,8 +50,8 @@ * not occur. The critical sections can be nested. Just make sure the methods * are used in pairs. */ -void thread_cooperate(void); -void thread_prevent_coop(void); +void thread_coop_enable(void); +void thread_coop_disable(void);
static inline void thread_init_cpu_info_non_bsp(struct cpu_info *ci) { @@ -81,8 +81,8 @@ { return -1; } -static inline void thread_cooperate(void) {} -static inline void thread_prevent_coop(void) {} +static inline void thread_coop_enable(void) {} +static inline void thread_coop_disable(void) {} struct cpu_info; static inline void thread_init_cpu_info_non_bsp(struct cpu_info *ci) { } #endif diff --git a/src/lib/thread.c b/src/lib/thread.c index 266ea38..47a23ac 100644 --- a/src/lib/thread.c +++ b/src/lib/thread.c @@ -114,7 +114,7 @@ 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 @@ return 0; }
-void thread_cooperate(void) +void thread_coop_enable(void) { struct thread *current;
@@ -366,7 +366,7 @@ current->can_yield++; }
-void thread_prevent_coop(void) +void thread_coop_disable(void) { struct thread *current;