summaryrefslogtreecommitdiff
path: root/kern/thread.c
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-12-25 20:41:46 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-27 00:00:50 +0100
commit84e0fb3f287864eca3a9322ef364b913f6a260bd (patch)
tree123333bce32a7d57c5112aa0d4c07b12821b6305 /kern/thread.c
parent63eefc08b5e762937118254ad0b82583cc38a2d2 (diff)
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: <Y6j72lWRL9rsYy4j@mars>
Diffstat (limited to 'kern/thread.c')
-rw-r--r--kern/thread.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kern/thread.c b/kern/thread.c
index 82863b38..c420869f 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -1136,7 +1136,7 @@ kern_return_t thread_halt(
}
}
-void __attribute__((noreturn)) walking_zombie(void)
+static void __attribute__((noreturn)) walking_zombie(void)
{
panic("the zombie walks!");
}
@@ -1722,7 +1722,7 @@ thread_t kernel_thread(
* This kernel thread runs forever looking for threads to destroy
* (when they request that they be destroyed, of course).
*/
-void __attribute__((noreturn)) reaper_thread_continue(void)
+static void __attribute__((noreturn)) reaper_thread_continue(void)
{
for (;;) {
thread_t thread;
@@ -2261,7 +2261,7 @@ thread_wire(
* pcb_collect doesn't do anything yet.
*/
-void thread_collect_scan(void)
+static void thread_collect_scan(void)
{
thread_t thread, prev_thread;
processor_set_t pset, prev_pset;
@@ -2348,8 +2348,7 @@ void consider_thread_collect(void)
#if MACH_DEBUG
-vm_size_t stack_usage(
- vm_offset_t stack)
+static vm_size_t stack_usage(vm_offset_t stack)
{
unsigned i;