From 84e0fb3f287864eca3a9322ef364b913f6a260bd Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sun, 25 Dec 2022 20:41:46 -0500 Subject: Fix some warnings with -Wmissing-prototypes. Marked some functions as static (private) as needed and added missing includes. This also revealed some dead code which was removed. Note that -Wmissing-prototypes is not enabled here since there is a bunch more warnings. Message-Id: --- kern/sched_prim.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kern/sched_prim.c') diff --git a/kern/sched_prim.c b/kern/sched_prim.c index 63a0437c..9e7a9c55 100644 --- a/kern/sched_prim.c +++ b/kern/sched_prim.c @@ -134,7 +134,7 @@ decl_simple_lock_data(, wait_lock[NUMQUEUES]) #define wait_hash(event) \ ((((long)(event) < 0) ? ~(long)(event) : (long)(event)) % NUMQUEUES) -void wait_queue_init(void) +static void wait_queue_init(void) { int i; @@ -162,7 +162,7 @@ void sched_init(void) * Thread timeout routine, called when timer expires. * Called at splsoftclock. */ -void thread_timeout( +static void thread_timeout( void *_thread) { thread_t thread = _thread; @@ -490,7 +490,7 @@ void thread_bind( * Assumes splsched. */ -thread_t thread_select( +static thread_t thread_select( processor_t myprocessor) { thread_t thread; @@ -1604,7 +1604,7 @@ int no_dispatch_count = 0; * to execute. */ -void __attribute__((noreturn)) idle_thread_continue(void) +static void __attribute__((noreturn)) idle_thread_continue(void) { processor_t myprocessor; volatile thread_t *threadp; @@ -1795,7 +1795,7 @@ void idle_thread(void) * we don't want to do at interrupt level. This allows us to * avoid blocking. */ -void sched_thread_continue(void) +static void sched_thread_continue(void) { while (TRUE) { (void) compute_mach_factor(); @@ -1860,7 +1860,7 @@ int stuck_count = 0; * it ran out of space. */ -boolean_t +static boolean_t do_runq_scan( run_queue_t runq) { -- cgit v1.2.3