aboutsummaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-01-20 01:19:53 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-24 00:13:56 +0100
commitfed2c08c45bd0e87b90d07fd52011de129be9315 (patch)
tree16c37d4f53d35da8d98ec3f4ff6cbf1fdb90bb89 /kern
parentc5134c7759b7a3f0c4ed0b57a1ab8e49666ee4b6 (diff)
downloadgnumach-fed2c08c45bd0e87b90d07fd52011de129be9315.tar.gz
gnumach-fed2c08c45bd0e87b90d07fd52011de129be9315.tar.bz2
gnumach-fed2c08c45bd0e87b90d07fd52011de129be9315.zip
Fix several warnings for -Wmissing-prototypes
* device/ds_routines.c: use static qualifier. * device/subrs.c: delete unused functions. * i386/i386/ast_check.c: include prototypes in kern/ast.h * i386/i386/db_disasm.c: Include prototypes in ddb/db_examine.h * i386/i386/db_interface.h: Define prototype for kdb_kentry. Expose debug methods feep and kd_debug_put. * i386/i386/db_trace.c: delete left over cthreads support, functions are not used. * i386/i386/model_dep.h: Define prototype for c_boot_entry. * i386/i386at/acpi_parse_apic.c: Static qualifiers. * i386/i386at/autoconf.c: Include header file for prototypes and remove dead code. * i386/i386at/autoconf.h: Fix prototype. * i386/i386at/com.c: Add static qualifiers, delete dead code. * i386/i386at/com.c: ditto. * i386/i386at/com.h: Define prototypes for debug functions. * i386/i386at/int_init.c: Include header. * i386/i386at/kd.c: Include header for debug interface. Remove dead kd_cmdreg_read and make xga_getpos static. * i386/i386at/kd_mouse.c: Static qualifiers. * i386/i386at/lpr.c: Dead lprpr. * i386/i386at/model_dep.c: Remove exit function. * kern/mach_clock.c: Include mig prototypes. * kern/mach_clock.h: Remove duplicates of mig prototypes. * kern/machine.c: Use static. * kern/startup.c: slave_main is unused. * kern/thread.h: Define thread_stats that is useful for debugging. * kern/timer.c: Keep db_thread_times since it can be used for debugging. * kern/timer.h: ditto. * linux/dev/glue/misc.c: Use mig header for host_get_time. Message-Id: <Y8oyiecaflCaYhaW@mercury.tail36e24.ts.net>
Diffstat (limited to 'kern')
-rw-r--r--kern/mach_clock.c1
-rw-r--r--kern/mach_clock.h13
-rw-r--r--kern/machine.c2
-rw-r--r--kern/startup.c7
-rw-r--r--kern/thread.h1
-rw-r--r--kern/timer.c38
-rw-r--r--kern/timer.h8
7 files changed, 31 insertions, 39 deletions
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index 06688fea..4b983fdd 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -47,6 +47,7 @@
#include <kern/host.h>
#include <kern/lock.h>
#include <kern/mach_clock.h>
+#include <kern/mach_host.server.h>
#include <kern/processor.h>
#include <kern/queue.h>
#include <kern/sched.h>
diff --git a/kern/mach_clock.h b/kern/mach_clock.h
index 2da311d1..7e8d3046 100644
--- a/kern/mach_clock.h
+++ b/kern/mach_clock.h
@@ -100,19 +100,6 @@ extern void record_time_stamp (time_value_t *stamp);
*/
extern void read_time_stamp (const time_value_t *stamp, time_value_t *result);
-extern kern_return_t host_get_time(
- host_t host,
- time_value_t *current_time);
-
-extern kern_return_t host_set_time(
- host_t host,
- time_value_t new_time);
-
-extern kern_return_t host_adjust_time(
- host_t host,
- time_value_t new_adjustment,
- time_value_t *old_adjustment);
-
extern void mapable_time_init (void);
/* For public timer elements. */
diff --git a/kern/machine.c b/kern/machine.c
index 8da6ad66..7eead810 100644
--- a/kern/machine.c
+++ b/kern/machine.c
@@ -153,7 +153,7 @@ static void cpu_down(int cpu)
* a shutdown, else it's an assign and caller must donate
* a reference.
*/
-void
+static void
processor_request_action(
processor_t processor,
processor_set_t new_pset)
diff --git a/kern/startup.c b/kern/startup.c
index bf63ec0e..2eb3a739 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -273,13 +273,6 @@ void start_kernel_threads(void)
/*NOTREACHED*/
}
-#if NCPUS > 1
-void slave_main(void)
-{
- cpu_launch_first_thread(THREAD_NULL);
-}
-#endif /* NCPUS > 1 */
-
/*
* Start up the first thread on a CPU.
* First thread is specified for the master CPU.
diff --git a/kern/thread.h b/kern/thread.h
index ebbbd11c..7252f410 100644
--- a/kern/thread.h
+++ b/kern/thread.h
@@ -410,6 +410,7 @@ extern void thread_unfreeze(
#if MACH_DEBUG
void stack_init(vm_offset_t stack);
void stack_finalize(vm_offset_t stack);
+void thread_stats(void);
#endif /* MACH_DEBUG */
#endif /* _KERN_THREAD_H_ */
diff --git a/kern/timer.c b/kern/timer.c
index 79ada27e..af6d4b28 100644
--- a/kern/timer.c
+++ b/kern/timer.c
@@ -375,24 +375,6 @@ static void timer_grab(
}
/*
- *
- * Db_timer_grab(): used by db_thread_read_times. An nonblocking
- * version of db_thread_get_times. Keep coherent with timer_grab
- * above.
- *
- */
-void db_timer_grab(
- timer_t timer,
- timer_save_t save)
-{
- /* Don't worry about coherency */
-
- (save)->high = (timer)->high_bits;
- (save)->low = (timer)->low_bits;
-}
-
-
-/*
* timer_read reads the value of a timer into a time_value_t. If the
* timer was modified during the read, retry. The value returned
* is accurate to the last update; time accumulated by a running
@@ -453,6 +435,25 @@ void thread_read_times(
system_time_p->microseconds = temp.low % 1000000;
}
+#if MACH_DEBUG
+
+/*
+ *
+ * Db_timer_grab(): used by db_thread_read_times. An nonblocking
+ * version of db_thread_get_times. Keep coherent with timer_grab
+ * above.
+ *
+ */
+static void db_timer_grab(
+ timer_t timer,
+ timer_save_t save)
+{
+ /* Don't worry about coherency */
+
+ (save)->high = (timer)->high_bits;
+ (save)->low = (timer)->low_bits;
+}
+
/*
* Db_thread_read_times: A version of thread_read_times that
* can be called by the debugger. This version does not call
@@ -486,6 +487,7 @@ void db_thread_read_times(
system_time_p->seconds = temp.high + temp.low/1000000;
system_time_p->microseconds = temp.low % 1000000;
}
+#endif /* MACH_DEBUG */
/*
* timer_delta takes the difference of a saved timer value
diff --git a/kern/timer.h b/kern/timer.h
index 2f473cf8..35782b41 100644
--- a/kern/timer.h
+++ b/kern/timer.h
@@ -184,4 +184,12 @@ extern void init_timers(void);
void timer_init(timer_t this_timer);
+#if MACH_DEBUG
+void db_thread_read_times(
+ thread_t thread,
+ time_value_t *user_time_p,
+ time_value_t *system_time_p);
+#endif
+
+
#endif /* _KERN_TIMER_H_ */