From fed2c08c45bd0e87b90d07fd52011de129be9315 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Fri, 20 Jan 2023 01:19:53 -0500 Subject: 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: --- kern/timer.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'kern/timer.c') diff --git a/kern/timer.c b/kern/timer.c index 79ada27e..af6d4b28 100644 --- a/kern/timer.c +++ b/kern/timer.c @@ -374,24 +374,6 @@ static void timer_grab( } while ( (save)->high != (timer)->high_bits_check); } -/* - * - * 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 @@ -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 -- cgit v1.2.3