From f23b4c91c4fb94e1bb6aeb4e7747f4ccf7767b41 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Thu, 18 Aug 1994 22:36:09 +0000 Subject: [PATCH] Fix up some sloppy coding practices: - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter. --- sys/amd64/amd64/machdep.c | 5 ++--- sys/amd64/amd64/pmap.c | 6 +----- sys/amd64/amd64/trap.c | 4 +--- sys/amd64/amd64/tsc.c | 4 +--- sys/amd64/include/cpufunc.h | 3 ++- sys/amd64/include/pmap.h | 16 +--------------- sys/amd64/isa/clock.c | 4 +--- sys/conf/Makefile.i386 | 4 ++-- sys/conf/Makefile.powerpc | 4 ++-- sys/ddb/db_access.c | 5 +---- sys/ddb/db_break.c | 6 +----- sys/ddb/db_command.c | 17 ++++------------ sys/ddb/db_command.h | 5 +---- sys/ddb/db_examine.c | 5 +---- sys/ddb/db_input.c | 14 +++++++------- sys/ddb/db_lex.c | 6 ++++-- sys/ddb/db_lex.h | 3 +-- sys/ddb/db_print.c | 4 +--- sys/ddb/db_sym.h | 8 ++++---- sys/ddb/db_trap.c | 8 +------- sys/ddb/db_variables.c | 3 +-- sys/ddb/db_watch.c | 6 +----- sys/ddb/db_watch.h | 6 +++--- sys/dev/ed/if_ed.c | 4 +--- sys/fs/procfs/procfs_vfsops.c | 3 ++- sys/fs/procfs/procfs_vnops.c | 8 ++++++-- sys/i386/conf/Makefile.i386 | 4 ++-- sys/i386/i386/conf.c | 12 +----------- sys/i386/i386/machdep.c | 5 ++--- sys/i386/i386/pmap.c | 6 +----- sys/i386/i386/trap.c | 4 +--- sys/i386/i386/tsc.c | 4 +--- sys/i386/include/cpufunc.h | 3 ++- sys/i386/include/pmap.h | 16 +--------------- sys/i386/isa/clock.c | 4 +--- sys/i386/isa/if_ed.c | 4 +--- sys/isa/atrtc.c | 4 +--- sys/kern/imgact_aout.c | 4 ++-- sys/kern/imgact_shell.c | 4 ++-- sys/kern/init_main.c | 4 +--- sys/kern/kern_clock.c | 28 ++++++++++++++++++++++----- sys/kern/kern_exec.c | 7 ++++--- sys/kern/kern_fork.c | 6 ++++-- sys/kern/kern_ktrace.c | 3 ++- sys/kern/kern_physio.c | 3 +-- sys/kern/kern_proc.c | 5 ++++- sys/kern/kern_sysctl.c | 4 ++-- sys/kern/kern_tc.c | 28 ++++++++++++++++++++++----- sys/kern/kern_timeout.c | 28 ++++++++++++++++++++++----- sys/kern/kern_xxx.c | 7 +------ sys/kern/subr_trap.c | 4 +--- sys/kern/sys_process.c | 8 +++++--- sys/kern/vfs_bio.c | 4 +++- sys/kern/vfs_export.c | 3 +-- sys/kern/vfs_init.c | 3 ++- sys/kern/vfs_lookup.c | 3 ++- sys/kern/vfs_subr.c | 3 +-- sys/miscfs/kernfs/kernfs_vnops.c | 8 ++++++-- sys/miscfs/procfs/procfs_vfsops.c | 3 ++- sys/miscfs/procfs/procfs_vnops.c | 8 ++++++-- sys/net/if.c | 7 +++---- sys/net/if.h | 4 ++-- sys/net/if_sl.c | 5 ++--- sys/net/raw_usrreq.c | 3 ++- sys/net/slcompress.c | 3 ++- sys/netinet/if_ether.c | 3 +-- sys/netinet/if_ether.h | 13 ++++++------- sys/netinet/in.c | 4 ++-- sys/netinet/in_var.h | 4 +--- sys/netinet/ip_input.c | 5 ++++- sys/netinet/ip_output.c | 4 +++- sys/netinet/ip_var.h | 11 +++++------ sys/netinet/tcp_input.c | 4 +--- sys/netinet/tcp_reass.c | 4 +--- sys/nfs/nfs_bio.c | 4 ++-- sys/nfs/nfsv2.h | 3 +-- sys/nfsclient/nfs_bio.c | 4 ++-- sys/sys/bio.h | 18 ++++++++--------- sys/sys/buf.h | 18 ++++++++--------- sys/sys/callout.h | 6 +++--- sys/sys/dkstat.h | 31 +++++++++++++++++------------- sys/sys/imgact.h | 8 +++++++- sys/sys/msgbuf.h | 4 ++-- sys/sys/proc.h | 13 ++++++++----- sys/sys/socketvar.h | 4 ++-- sys/sys/syslog.h | 6 ++++-- sys/sys/systm.h | 32 +++++++++++++++++++++++++++---- sys/sys/time.h | 8 ++++++-- sys/sys/timetc.h | 8 ++++++-- sys/sys/tty.h | 4 ++-- sys/sys/ucred.h | 10 ++++++---- sys/ufs/ffs/ffs_extern.h | 4 +--- sys/ufs/ffs/ffs_vfsops.c | 4 +--- sys/ufs/mfs/mfs_vfsops.c | 3 +-- sys/ufs/ufs/ufs_inode.c | 3 +-- sys/vm/swap_pager.c | 22 +-------------------- sys/vm/vm_glue.c | 3 +-- sys/vm/vm_kern.c | 15 ++++++++++++--- sys/vm/vm_kern.h | 24 +++++++++++++---------- sys/vm/vm_map.c | 6 +----- sys/vm/vm_object.c | 7 +++---- sys/vm/vm_pageout.c | 7 +++---- sys/vm/vm_pageout.h | 4 +--- sys/vm/vm_pager.c | 3 +-- 104 files changed, 379 insertions(+), 386 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index b5616e5e2f59..54c2a5881081 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.51 1994/08/13 03:49:42 wollman Exp $ + * $Id: machdep.c,v 1.52 1994/08/13 14:21:42 davidg Exp $ */ #include "npx.h" @@ -95,7 +95,6 @@ static void identifycpu(void); static void initcpu(void); static int test_page(int *, int); -extern int grow(struct proc *,u_int); char machine[] = "i386"; char cpu_model[sizeof("Pentium") + 1]; @@ -1073,7 +1072,7 @@ void init386(first) int first; { - extern ssdtosd(), lgdt(), lidt(), lldt(), etext; + extern lgdt(), lidt(), lldt(), etext; int x, *pi; unsigned biosbasemem, biosextmem; struct gate_descriptor *gdp; diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 2a1011f02e52..70fa5ffcf10a 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.31 1994/08/07 14:53:10 davidg Exp $ + * $Id: pmap.c,v 1.32 1994/08/13 03:49:44 wollman Exp $ */ /* @@ -153,7 +153,6 @@ static inline pv_entry_t get_pv_entry(); static inline void pmap_use_pt(); static inline void pmap_unuse_pt(); -inline pt_entry_t * pmap_pte(); extern vm_offset_t clean_sva, clean_eva; extern int cpu_class; @@ -338,7 +337,6 @@ pmap_bootstrap(firstaddr, loadaddr) vm_offset_t va; pt_entry_t *pte; #endif - extern int IdlePTD; avail_start = firstaddr + DMAPAGES*NBPG; @@ -414,7 +412,6 @@ pmap_init(phys_start, phys_end) int rv; int i; extern int KPTphys; - extern int IdlePTD; /* * Now that kernel map has been allocated, we can mark as @@ -1465,7 +1462,6 @@ pmap_object_init_pt(pmap, addr, object, offset, size) int s; vm_offset_t v, lastv=0; pt_entry_t pte; - extern vm_map_t kernel_map; vm_offset_t objbytes; int anyvalid = 0; diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 21cdac65faee..58c0090e22c2 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.27 1994/08/01 11:25:28 davidg Exp $ + * $Id: trap.c,v 1.28 1994/08/10 04:39:47 wollman Exp $ */ /* @@ -73,8 +73,6 @@ int trap_pfault __P((struct trapframe *, int)); void trap_fatal __P((struct trapframe *)); -extern int grow(struct proc *,u_int); - struct sysent sysent[]; int nsysent; diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index e3f3f2113c9b..e72d6a35424d 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.14 1994/08/15 03:15:18 wollman Exp $ + * $Id: clock.c,v 1.15 1994/08/18 05:09:21 davidg Exp $ */ /* @@ -59,8 +59,6 @@ #endif #define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x)) -void hardclock(); -void statclock(); static int beeping; int timer0_divisor = TIMER_DIV(100); /* XXX should be hz */ u_int timer0_prescale; diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 77f921379418..8c997827156a 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.15 1994/08/11 02:26:08 jkh Exp $ + * $Id: cpufunc.h,v 1.16 1994/08/13 03:49:49 wollman Exp $ */ /* @@ -153,6 +153,7 @@ void load_cr0 __P((u_int cr0)); u_int rcr0 __P((void)); void load_cr3(u_long); u_long rcr3(void); +extern void DELAY(int); void setidt __P((int, void (*)(), int, int)); extern u_long kvtop(void *); diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 7ddcebd0fd37..1e4cf2baab1c 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -42,7 +42,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $Id: pmap.h,v 1.12 1994/03/24 23:12:48 davidg Exp $ + * $Id: pmap.h,v 1.14 1994/05/25 08:56:24 rgrimes Exp $ */ #ifndef _PMAP_MACHINE_ @@ -194,23 +194,9 @@ pv_entry_t pv_table; /* array of entries, one per page */ #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) -extern pmap_t pmap_create(vm_size_t); -extern void pmap_pinit(struct pmap *); -extern void pmap_destroy(pmap_t); -extern void pmap_release(struct pmap *); -extern void pmap_reference(pmap_t); -extern void pmap_remove(struct pmap *, vm_offset_t, vm_offset_t); -extern void pmap_protect(struct pmap *, vm_offset_t, vm_offset_t, vm_prot_t); -extern void pmap_enter(pmap_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); -extern void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t); extern inline pt_entry_t *pmap_pte(pmap_t, vm_offset_t); -extern vm_offset_t pmap_extract(pmap_t, vm_offset_t); -extern void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); -extern void pmap_collect(pmap_t); struct pcb; extern void pmap_activate(pmap_t, struct pcb *); extern pmap_t pmap_kernel(void); -extern void pmap_pageable(pmap_t, vm_offset_t, vm_offset_t, boolean_t); - #endif /* KERNEL */ diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index e3f3f2113c9b..e72d6a35424d 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.14 1994/08/15 03:15:18 wollman Exp $ + * $Id: clock.c,v 1.15 1994/08/18 05:09:21 davidg Exp $ */ /* @@ -59,8 +59,6 @@ #endif #define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x)) -void hardclock(); -void statclock(); static int beeping; int timer0_divisor = TIMER_DIV(100); /* XXX should be hz */ u_int timer0_prescale; diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 73df15a8ff79..0dc0931aca0d 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -1,6 +1,6 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.27 1994/08/06 10:52:15 davidg Exp $ +# $Id: Makefile.i386,v 1.28 1994/08/13 03:49:32 wollman Exp $ # # Makefile for FreeBSD # @@ -33,7 +33,7 @@ S= ../.. .endif I386= ${S}/i386 -CWARNFLAGS=-W -Wreturn-type -Wcomment +CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls # # The following flags are next up for working on: # -Wredundant-decls -Wnested-externs diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 73df15a8ff79..0dc0931aca0d 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -1,6 +1,6 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.27 1994/08/06 10:52:15 davidg Exp $ +# $Id: Makefile.i386,v 1.28 1994/08/13 03:49:32 wollman Exp $ # # Makefile for FreeBSD # @@ -33,7 +33,7 @@ S= ../.. .endif I386= ${S}/i386 -CWARNFLAGS=-W -Wreturn-type -Wcomment +CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls # # The following flags are next up for working on: # -Wredundant-decls -Wnested-externs diff --git a/sys/ddb/db_access.c b/sys/ddb/db_access.c index 196634d81f0d..7178bbe1c96c 100644 --- a/sys/ddb/db_access.c +++ b/sys/ddb/db_access.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_access.c,v 1.4 1993/12/19 00:49:42 wollman Exp $ + * $Id: db_access.c,v 1.5 1994/08/13 03:49:13 wollman Exp $ */ /* @@ -40,9 +40,6 @@ * boundaries. */ -extern void db_read_bytes(); /* machine-dependent */ -extern void db_write_bytes(); /* machine-dependent */ - unsigned db_extend[] = { /* table for sign-extending */ 0, 0xFFFFFF80U, diff --git a/sys/ddb/db_break.c b/sys/ddb/db_break.c index d9f9f2ff04d2..cb9c55e0a1b7 100644 --- a/sys/ddb/db_break.c +++ b/sys/ddb/db_break.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_break.c,v 1.3 1993/11/25 01:30:03 wollman Exp $ + * $Id: db_break.c,v 1.4 1994/08/13 03:49:15 wollman Exp $ */ /* @@ -44,10 +44,6 @@ #include #include -extern boolean_t db_map_equal(); -extern boolean_t db_map_current(); -extern vm_map_t db_map_addr(); - #define NBREAKPOINTS 100 struct db_breakpoint db_break_table[NBREAKPOINTS]; db_breakpoint_t db_next_free_breakpoint = &db_break_table[0]; diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index d7f3f004a795..ed328be8b893 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_command.c,v 1.5 1994/05/25 08:51:12 rgrimes Exp $ + * $Id: db_command.c,v 1.6 1994/08/13 03:49:16 wollman Exp $ */ /* @@ -303,10 +303,9 @@ db_command(last_cmdp, cmd_table) /* * 'show' commands */ -extern void db_listbreak_cmd(); -extern void db_listwatch_cmd(); -extern void db_show_regs(), db_show_one_thread(), db_show_all_threads(); -extern void vm_map_print(), vm_object_print(), vm_page_print(); + +extern void db_show_one_thread(), db_show_all_threads(); +extern void vm_page_print(); /* extern void db_ps(); */ extern void ipc_port_print(); void db_show_help(); @@ -338,14 +337,6 @@ struct command db_show_cmds[] = { { (char *)0, } }; -extern void db_print_cmd(), db_examine_cmd(), db_set_cmd(); -extern void db_search_cmd(); -extern void db_write_cmd(); -extern void db_delete_cmd(), db_breakpoint_cmd(); -extern void db_deletewatch_cmd(), db_watchpoint_cmd(); -extern void db_single_step_cmd(), db_trace_until_call_cmd(), - db_trace_until_matching_cmd(), db_continue_cmd(); -extern void db_stack_trace_cmd(); void db_help_cmd(); void db_fncall(); diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index 38e86fd9a2d7..9000cd049649 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_command.h,v 1.3 1993/11/07 17:39:22 wollman Exp $ + * $Id: db_command.h,v 1.4 1994/08/13 03:49:16 wollman Exp $ */ #ifndef _DDB_DB_COMMAND_H_ @@ -42,9 +42,6 @@ #include extern void db_command_loop(); -extern void db_skip_to_eol(); - -extern void db_error(/* char * */); /* report error */ extern db_addr_t db_dot; /* current location */ extern db_addr_t db_last_addr; /* last explicit address typed */ diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index 7fd55a2f534c..9d3924bd7154 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_examine.c,v 1.4 1993/12/19 00:49:43 wollman Exp $ + * $Id: db_examine.c,v 1.5 1994/08/13 03:49:17 wollman Exp $ */ /* @@ -44,9 +44,6 @@ char db_examine_format[TOK_STRING_SIZE] = "x"; -extern db_addr_t db_disasm(/* db_addr_t, boolean_t */); - /* instruction disassembler */ - static void db_examine(db_addr_t, char *, int); static void db_search(db_addr_t, int, db_expr_t, db_expr_t, u_int); diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c index d768992575fe..4697a8c8f3fc 100644 --- a/sys/ddb/db_input.c +++ b/sys/ddb/db_input.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_input.c,v 1.4 1993/12/19 00:49:44 wollman Exp $ + * $Id: db_input.c,v 1.5 1994/08/13 03:49:19 wollman Exp $ */ /* @@ -193,6 +193,12 @@ db_inputchar(c) return (0); } +int +cnmaygetc (void) +{ + return (-1); +} + int db_readline(lstart, lsize) char * lstart; @@ -242,12 +248,6 @@ db_check_interrupt() } } -int -cnmaygetc (void) -{ - return (-1); -} - /* called from kdb_trap in db_interface.c */ void cnpollc (flag) diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c index 1c883d883dd2..8f5f4b0b4813 100644 --- a/sys/ddb/db_lex.c +++ b/sys/ddb/db_lex.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_lex.c,v 1.3 1993/11/25 01:30:07 wollman Exp $ + * $Id: db_lex.c,v 1.4 1994/08/13 03:49:20 wollman Exp $ */ /* @@ -41,6 +41,8 @@ char db_line[120]; char * db_lp, *db_endlp; +static int db_lex(void); + int db_read_line() { @@ -122,7 +124,7 @@ db_flush_lex() db_look_token = 0; } -int +static int db_lex() { int c; diff --git a/sys/ddb/db_lex.h b/sys/ddb/db_lex.h index e2f224eccd16..db1d2b9f20ce 100644 --- a/sys/ddb/db_lex.h +++ b/sys/ddb/db_lex.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_lex.h,v 1.2 1993/10/16 16:47:19 rgrimes Exp $ + * $Id: db_lex.h,v 1.3 1993/11/07 17:39:23 wollman Exp $ */ #ifndef _DDB_DB_LEX_H_ @@ -47,7 +47,6 @@ extern void db_flush_lex(); extern int db_tok_number; #define TOK_STRING_SIZE 120 extern char db_tok_string[TOK_STRING_SIZE]; -extern int db_radix; #define tEOF (-1) #define tEOL 1 diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c index 10c4bcd57114..a0694b0c27c3 100644 --- a/sys/ddb/db_print.c +++ b/sys/ddb/db_print.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_print.c,v 1.3 1993/11/25 01:30:09 wollman Exp $ + * $Id: db_print.c,v 1.4 1994/08/13 03:49:21 wollman Exp $ */ /* @@ -44,8 +44,6 @@ #include #include -extern unsigned int db_maxoff; - void db_show_regs(db_expr_t dummy1, int dummy2, db_expr_t dummy3, char *dummy4) { diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h index a256b79ed229..d1090cf7123f 100644 --- a/sys/ddb/db_sym.h +++ b/sys/ddb/db_sym.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_sym.h,v 1.2 1993/10/16 16:47:27 rgrimes Exp $ + * $Id: db_sym.h,v 1.3 1993/11/07 17:39:25 wollman Exp $ */ #ifndef _DDB_DB_SYM_H_ @@ -77,9 +77,6 @@ extern boolean_t db_qualify_ambiguous_names; extern void db_add_symbol_table(); /* extend the list of symbol tables */ -extern int db_value_of_name(/* char*, db_expr_t* */); - /* find symbol value given name */ - extern db_sym_t db_search_symbol(/* db_expr_t, db_strategy_t, int* */); /* find symbol given value */ @@ -99,4 +96,7 @@ extern int db_eqname(/* char*, char*, char */); extern void db_printsym(/* db_expr_t, db_strategy_t */); /* print closest symbol to a value */ +extern boolean_t db_line_at_pc(int, int, int, int); +extern int X_db_sym_nymargs(db_symtab_t *, db_sym_t, int *, char **); + #endif /* _DDB_DB_SYM_H_ */ diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c index 05b0487e1c92..8d2941ab5f88 100644 --- a/sys/ddb/db_trap.c +++ b/sys/ddb/db_trap.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_trap.c,v 1.3 1993/11/25 01:30:12 wollman Exp $ + * $Id: db_trap.c,v 1.4 1994/08/13 03:49:24 wollman Exp $ */ /* @@ -41,12 +41,6 @@ #include #include -extern void db_restart_at_pc(); -extern boolean_t db_stop_at_pc(); - -extern int db_inst_count; -extern int db_load_count; -extern int db_store_count; void db_trap(type, code) diff --git a/sys/ddb/db_variables.c b/sys/ddb/db_variables.c index fe5230a20256..4a6acf2f6182 100644 --- a/sys/ddb/db_variables.c +++ b/sys/ddb/db_variables.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_variables.c,v 1.3 1993/11/25 01:30:13 wollman Exp $ + * $Id: db_variables.c,v 1.4 1994/08/13 03:49:25 wollman Exp $ */ /* @@ -39,7 +39,6 @@ #include #include -void db_read_variable(struct db_variable *, db_expr_t *); static void db_write_variable(struct db_variable *, db_expr_t *); struct db_variable db_vars[] = { diff --git a/sys/ddb/db_watch.c b/sys/ddb/db_watch.c index afeedf4f12b6..fb6680fd47a4 100644 --- a/sys/ddb/db_watch.c +++ b/sys/ddb/db_watch.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_watch.c,v 1.3 1993/11/25 01:30:15 wollman Exp $ + * $Id: db_watch.c,v 1.4 1994/08/13 03:49:25 wollman Exp $ */ /* @@ -46,10 +46,6 @@ * Watchpoints. */ -extern boolean_t db_map_equal(); -extern boolean_t db_map_current(); -extern vm_map_t db_map_addr(); - boolean_t db_watchpoints_inserted = TRUE; #define NWATCHPOINTS 100 diff --git a/sys/ddb/db_watch.h b/sys/ddb/db_watch.h index f8932de39de9..d564ad24afbf 100644 --- a/sys/ddb/db_watch.h +++ b/sys/ddb/db_watch.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id$ + * $Id: db_watch.h,v 1.2 1993/10/16 16:47:33 rgrimes Exp $ */ /* @@ -50,8 +50,8 @@ typedef struct db_watchpoint { extern boolean_t db_find_watchpoint(/* vm_map_t map, db_addr_t addr, db_regs_t *regs */); -extern void db_set_watchpoints(); -extern void db_clear_watchpoints(); + + extern void db_set_watchpoint(/* vm_map_t map, db_addr_t addr, vm_size_t size */); extern void db_delete_watchpoint(/* vm_map_t map, db_addr_t addr */); diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index bca7f31cb1a3..8577d088e2b1 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -13,7 +13,7 @@ * the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000, * and a variety of similar clones. * - * $Id: if_ed.c,v 1.43 1994/08/12 06:36:51 davidg Exp $ + * $Id: if_ed.c,v 1.44 1994/08/13 03:50:03 wollman Exp $ */ #include "ed.h" @@ -131,8 +131,6 @@ u_short ed_pio_write_mbufs(); void ed_setrcr(struct ifnet *, struct ed_softc *); -extern int ether_output(); - struct trailer_header { u_short ether_type; u_short ether_residual; diff --git a/sys/fs/procfs/procfs_vfsops.c b/sys/fs/procfs/procfs_vfsops.c index b5c9c7d9226a..9d161098442c 100644 --- a/sys/fs/procfs/procfs_vfsops.c +++ b/sys/fs/procfs/procfs_vfsops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: procfs_vfsops.c,v 1.2 1994/05/25 09:08:33 rgrimes Exp $ + * $Id: procfs_vfsops.c,v 1.3 1994/08/02 07:45:23 davidg Exp $ */ /* @@ -44,6 +44,7 @@ */ #include +#include #include #include #include diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index e06d1316e98e..7e59301f6b41 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.6 (Berkeley) 2/7/94 * - * $Id: procfs_vnops.c,v 1.2 1994/05/25 09:08:39 rgrimes Exp $ + * $Id: procfs_vnops.c,v 1.3 1994/08/02 07:45:25 davidg Exp $ */ /* @@ -376,7 +376,11 @@ procfs_getattr(ap) * p_stat structure is not addressible if u. gets * swapped out for that process. */ - microtime(&vap->va_ctime); + { + struct timeval tv; + microtime(&tv); + TIMEVAL_TO_TIMESPEC(&tv, &vap->va_ctime); + } vap->va_atime = vap->va_mtime = vap->va_ctime; /* diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386 index 73df15a8ff79..0dc0931aca0d 100644 --- a/sys/i386/conf/Makefile.i386 +++ b/sys/i386/conf/Makefile.i386 @@ -1,6 +1,6 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.27 1994/08/06 10:52:15 davidg Exp $ +# $Id: Makefile.i386,v 1.28 1994/08/13 03:49:32 wollman Exp $ # # Makefile for FreeBSD # @@ -33,7 +33,7 @@ S= ../.. .endif I386= ${S}/i386 -CWARNFLAGS=-W -Wreturn-type -Wcomment +CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls # # The following flags are next up for working on: # -Wredundant-decls -Wnested-externs diff --git a/sys/i386/i386/conf.c b/sys/i386/i386/conf.c index 3360de618c36..3f03743c8984 100644 --- a/sys/i386/i386/conf.c +++ b/sys/i386/i386/conf.c @@ -41,7 +41,7 @@ * SUCH DAMAGE. * * from: @(#)conf.c 5.8 (Berkeley) 5/12/91 - * $Id: conf.c,v 1.24 1994/04/21 14:10:31 sos Exp $ + * $Id: conf.c,v 1.26 1994/05/25 08:52:45 rgrimes Exp $ */ #include @@ -66,7 +66,6 @@ typedef int d_reset_t __P((int)); typedef int d_select_t __P((dev_t, int, struct proc *)); typedef int d_mmap_t __P((/* XXX */)); -int nullop(), enxio(), enodev(); d_rdwr_t rawread, rawwrite; d_strategy_t swstrategy; @@ -203,7 +202,6 @@ d_ioctl_t fdioctl; #define swopen (d_open_t *)enodev #define swclose (d_close_t *)enodev -d_strategy_t swstrategy; #define swioctl (d_ioctl_t *)enodev #define swdump (d_dump_t *)enodev #define swsize (d_psize_t *)enodev @@ -240,12 +238,6 @@ int nblkdev = sizeof (bdevsw) / sizeof (bdevsw[0]); /* console */ #include "machine/cons.h" -d_open_t cnopen; -d_close_t cnclose; -d_rdwr_t cnread, cnwrite; -d_ioctl_t cnioctl; -d_select_t cnselect; - /* more console */ d_open_t pcopen; d_close_t pcclose; @@ -322,8 +314,6 @@ d_rdwr_t logread; d_ioctl_t logioctl; d_select_t logselect; -d_select_t ttselect, seltrue; - #include "lpt.h" #if NLPT > 0 d_open_t lptopen; diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index b5616e5e2f59..54c2a5881081 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.51 1994/08/13 03:49:42 wollman Exp $ + * $Id: machdep.c,v 1.52 1994/08/13 14:21:42 davidg Exp $ */ #include "npx.h" @@ -95,7 +95,6 @@ static void identifycpu(void); static void initcpu(void); static int test_page(int *, int); -extern int grow(struct proc *,u_int); char machine[] = "i386"; char cpu_model[sizeof("Pentium") + 1]; @@ -1073,7 +1072,7 @@ void init386(first) int first; { - extern ssdtosd(), lgdt(), lidt(), lldt(), etext; + extern lgdt(), lidt(), lldt(), etext; int x, *pi; unsigned biosbasemem, biosextmem; struct gate_descriptor *gdp; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 2a1011f02e52..70fa5ffcf10a 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.31 1994/08/07 14:53:10 davidg Exp $ + * $Id: pmap.c,v 1.32 1994/08/13 03:49:44 wollman Exp $ */ /* @@ -153,7 +153,6 @@ static inline pv_entry_t get_pv_entry(); static inline void pmap_use_pt(); static inline void pmap_unuse_pt(); -inline pt_entry_t * pmap_pte(); extern vm_offset_t clean_sva, clean_eva; extern int cpu_class; @@ -338,7 +337,6 @@ pmap_bootstrap(firstaddr, loadaddr) vm_offset_t va; pt_entry_t *pte; #endif - extern int IdlePTD; avail_start = firstaddr + DMAPAGES*NBPG; @@ -414,7 +412,6 @@ pmap_init(phys_start, phys_end) int rv; int i; extern int KPTphys; - extern int IdlePTD; /* * Now that kernel map has been allocated, we can mark as @@ -1465,7 +1462,6 @@ pmap_object_init_pt(pmap, addr, object, offset, size) int s; vm_offset_t v, lastv=0; pt_entry_t pte; - extern vm_map_t kernel_map; vm_offset_t objbytes; int anyvalid = 0; diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 21cdac65faee..58c0090e22c2 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.27 1994/08/01 11:25:28 davidg Exp $ + * $Id: trap.c,v 1.28 1994/08/10 04:39:47 wollman Exp $ */ /* @@ -73,8 +73,6 @@ int trap_pfault __P((struct trapframe *, int)); void trap_fatal __P((struct trapframe *)); -extern int grow(struct proc *,u_int); - struct sysent sysent[]; int nsysent; diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index e3f3f2113c9b..e72d6a35424d 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.14 1994/08/15 03:15:18 wollman Exp $ + * $Id: clock.c,v 1.15 1994/08/18 05:09:21 davidg Exp $ */ /* @@ -59,8 +59,6 @@ #endif #define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x)) -void hardclock(); -void statclock(); static int beeping; int timer0_divisor = TIMER_DIV(100); /* XXX should be hz */ u_int timer0_prescale; diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 77f921379418..8c997827156a 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.15 1994/08/11 02:26:08 jkh Exp $ + * $Id: cpufunc.h,v 1.16 1994/08/13 03:49:49 wollman Exp $ */ /* @@ -153,6 +153,7 @@ void load_cr0 __P((u_int cr0)); u_int rcr0 __P((void)); void load_cr3(u_long); u_long rcr3(void); +extern void DELAY(int); void setidt __P((int, void (*)(), int, int)); extern u_long kvtop(void *); diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 7ddcebd0fd37..1e4cf2baab1c 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -42,7 +42,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $Id: pmap.h,v 1.12 1994/03/24 23:12:48 davidg Exp $ + * $Id: pmap.h,v 1.14 1994/05/25 08:56:24 rgrimes Exp $ */ #ifndef _PMAP_MACHINE_ @@ -194,23 +194,9 @@ pv_entry_t pv_table; /* array of entries, one per page */ #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) -extern pmap_t pmap_create(vm_size_t); -extern void pmap_pinit(struct pmap *); -extern void pmap_destroy(pmap_t); -extern void pmap_release(struct pmap *); -extern void pmap_reference(pmap_t); -extern void pmap_remove(struct pmap *, vm_offset_t, vm_offset_t); -extern void pmap_protect(struct pmap *, vm_offset_t, vm_offset_t, vm_prot_t); -extern void pmap_enter(pmap_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); -extern void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t); extern inline pt_entry_t *pmap_pte(pmap_t, vm_offset_t); -extern vm_offset_t pmap_extract(pmap_t, vm_offset_t); -extern void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); -extern void pmap_collect(pmap_t); struct pcb; extern void pmap_activate(pmap_t, struct pcb *); extern pmap_t pmap_kernel(void); -extern void pmap_pageable(pmap_t, vm_offset_t, vm_offset_t, boolean_t); - #endif /* KERNEL */ diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index e3f3f2113c9b..e72d6a35424d 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.14 1994/08/15 03:15:18 wollman Exp $ + * $Id: clock.c,v 1.15 1994/08/18 05:09:21 davidg Exp $ */ /* @@ -59,8 +59,6 @@ #endif #define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x)) -void hardclock(); -void statclock(); static int beeping; int timer0_divisor = TIMER_DIV(100); /* XXX should be hz */ u_int timer0_prescale; diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index bca7f31cb1a3..8577d088e2b1 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/if_ed.c @@ -13,7 +13,7 @@ * the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000, * and a variety of similar clones. * - * $Id: if_ed.c,v 1.43 1994/08/12 06:36:51 davidg Exp $ + * $Id: if_ed.c,v 1.44 1994/08/13 03:50:03 wollman Exp $ */ #include "ed.h" @@ -131,8 +131,6 @@ u_short ed_pio_write_mbufs(); void ed_setrcr(struct ifnet *, struct ed_softc *); -extern int ether_output(); - struct trailer_header { u_short ether_type; u_short ether_residual; diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index e3f3f2113c9b..e72d6a35424d 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.14 1994/08/15 03:15:18 wollman Exp $ + * $Id: clock.c,v 1.15 1994/08/18 05:09:21 davidg Exp $ */ /* @@ -59,8 +59,6 @@ #endif #define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x)) -void hardclock(); -void statclock(); static int beeping; int timer0_divisor = TIMER_DIV(100); /* XXX should be hz */ u_int timer0_prescale; diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index 4be4e5041f4a..31705a2e6f04 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: imgact_aout.c,v 1.3 1993/12/30 01:39:29 davidg Exp $ + * $Id: imgact_aout.c,v 1.5 1994/05/25 09:02:00 rgrimes Exp $ */ #include @@ -185,6 +185,6 @@ exec_aout_imgact(iparams) * Since `const' objects end up in the text segment, TEXT_SET is the * correct directive to use. */ -static const struct execsw aout_execsw = { exec_aout_imgact }; +static const struct execsw aout_execsw = { exec_aout_imgact, "a.out" }; TEXT_SET(execsw_set, aout_execsw); diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c index 432c899f279c..2884231b0f18 100644 --- a/sys/kern/imgact_shell.c +++ b/sys/kern/imgact_shell.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: imgact_shell.c,v 1.3 1994/05/25 09:02:06 rgrimes Exp $ + * $Id: imgact_shell.c,v 1.4 1994/08/13 03:50:23 wollman Exp $ */ #include @@ -141,5 +141,5 @@ exec_shell_imgact(iparams) * Since `const' objects end up in the text segment, TEXT_SET is the * correct directive to use. */ -static const struct execsw shell_execsw = { exec_shell_imgact }; +static const struct execsw shell_execsw = { exec_shell_imgact, "#!" }; TEXT_SET(execsw_set, shell_execsw); diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 7e8c70bf559a..5089576cffff 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)init_main.c 8.9 (Berkeley) 1/21/94 - * $Id$ + * $Id: init_main.c,v 1.4 1994/08/02 07:41:49 davidg Exp $ */ #include @@ -304,7 +304,6 @@ main(framep) /* * Start update daemon (process 3). */ -#ifndef LAPTOP if (fork(p, (void *) NULL, rval)) panic("failed fork update daemon"); if (rval[1]) { @@ -315,7 +314,6 @@ main(framep) vfs_update(); /*NOTREACHED*/ } -#endif /* The scheduler is an infinite loop. */ scheduler(); diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index c963fdae4feb..5b365f5549c2 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id$ + * $Id: kern_clock.c,v 1.3 1994/08/02 07:41:54 davidg Exp $ */ #include @@ -53,6 +53,26 @@ #include #endif +/* Does anybody else really care about these? */ +struct callout *callfree, *callout, calltodo; +int ncallout; + +/* Some of these don't belong here, but it's easiest to concentrate them. */ +long cp_time[CPUSTATES]; +long dk_seek[DK_NDRIVE]; +long dk_time[DK_NDRIVE]; +long dk_wds[DK_NDRIVE]; +long dk_wpms[DK_NDRIVE]; +long dk_xfer[DK_NDRIVE]; + +int dk_busy; +int dk_ndrive = DK_NDRIVE; + +long tk_cancc; +long tk_nin; +long tk_nout; +long tk_rawcc; + /* * Clock handling routines. * @@ -257,7 +277,7 @@ softclock() */ void timeout(ftn, arg, ticks) - void (*ftn) __P((void *)); + timeout_t ftn; void *arg; register int ticks; { @@ -302,7 +322,7 @@ timeout(ftn, arg, ticks) void untimeout(ftn, arg) - void (*ftn) __P((void *)); + timeout_t ftn; void *arg; { register struct callout *p, *t; @@ -400,8 +420,6 @@ stopprofclock(p) } } -int dk_ndrive = DK_NDRIVE; - /* * Statistics clock. Grab profile sample, and if divider reaches 0, * do process and kernel statistics. diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index b54e09b042a7..6602f7f2b029 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.2 1994/05/25 09:03:03 rgrimes Exp $ + * $Id: kern_exec.c,v 1.3 1994/08/06 09:06:31 davidg Exp $ */ #include @@ -52,9 +52,10 @@ #include -int exec_extract_strings __P((struct image_params *)); int *exec_copyout_strings __P((struct image_params *)); +static int exec_check_permissions(struct image_params *); + /* * execsw_set is constructed for us by the linker. Each of the items * is a pointer to a `const struct execsw', hence the double pointer here. @@ -479,7 +480,7 @@ exec_copyout_strings(iparams) * Check permissions of file to execute. * Return 0 for success or error code on failure. */ -int +static int exec_check_permissions(iparams) struct image_params *iparams; { diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index e0362e9c257c..ce5d6aa5ef20 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 - * $Id: kern_fork.c,v 1.3 1994/08/02 07:42:00 davidg Exp $ + * $Id: kern_fork.c,v 1.4 1994/08/06 07:15:04 davidg Exp $ */ #include @@ -52,6 +52,8 @@ #include #include +static int fork1(struct proc *, int, int *); + struct fork_args { int dummy; }; @@ -79,7 +81,7 @@ vfork(p, uap, retval) int nprocs = 1; /* process 0 */ -int +static int fork1(p1, isvfork, retval) register struct proc *p1; int isvfork, retval[]; diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 711f1b65f0f8..c79620a46f81 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -31,12 +31,13 @@ * SUCH DAMAGE. * * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93 - * $Id$ + * $Id: kern_ktrace.c,v 1.3 1994/08/02 07:42:02 davidg Exp $ */ #ifdef KTRACE #include +#include #include #include #include diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 007d37fec173..e29d0b980fe7 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: kern_physio.c,v 1.5 1994/08/07 13:10:31 davidg Exp $ + * $Id: kern_physio.c,v 1.6 1994/08/08 13:53:55 davidg Exp $ */ #include @@ -27,7 +27,6 @@ #include static void physwakeup(); -u_int minphys(struct buf *bp); int physio(strategy, bp, dev, rw, minp, uio) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 11b381625389..c4b34c90e24e 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.4 (Berkeley) 1/4/94 - * $Id$ + * $Id: kern_proc.c,v 1.3 1994/08/02 07:42:07 davidg Exp $ */ #include @@ -50,6 +50,9 @@ #include #include +volatile struct proc *allproc; /* all processes */ +struct proc *zombproc; /* just zombies */ + void pgdelete __P((struct pgrp *)); void fixjobc __P((struct proc *, struct pgrp *, int)); diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 0896ebfe1e84..63e8dd632aa6 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.5 1994/08/08 15:40:58 wollman Exp $ + * $Id: kern_sysctl.c,v 1.7 1994/08/10 06:25:02 wollman Exp $ */ /* @@ -198,7 +198,7 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) struct proc *p; { int error, level, inthostid; - extern char ostype[], osrelease[], version[]; + extern char ostype[], osrelease[]; /* all sysctl names at this level are terminal */ if (namelen != 1 && !(name[0] == KERN_PROC || name[0] == KERN_PROF)) diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index c963fdae4feb..5b365f5549c2 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id$ + * $Id: kern_clock.c,v 1.3 1994/08/02 07:41:54 davidg Exp $ */ #include @@ -53,6 +53,26 @@ #include #endif +/* Does anybody else really care about these? */ +struct callout *callfree, *callout, calltodo; +int ncallout; + +/* Some of these don't belong here, but it's easiest to concentrate them. */ +long cp_time[CPUSTATES]; +long dk_seek[DK_NDRIVE]; +long dk_time[DK_NDRIVE]; +long dk_wds[DK_NDRIVE]; +long dk_wpms[DK_NDRIVE]; +long dk_xfer[DK_NDRIVE]; + +int dk_busy; +int dk_ndrive = DK_NDRIVE; + +long tk_cancc; +long tk_nin; +long tk_nout; +long tk_rawcc; + /* * Clock handling routines. * @@ -257,7 +277,7 @@ softclock() */ void timeout(ftn, arg, ticks) - void (*ftn) __P((void *)); + timeout_t ftn; void *arg; register int ticks; { @@ -302,7 +322,7 @@ timeout(ftn, arg, ticks) void untimeout(ftn, arg) - void (*ftn) __P((void *)); + timeout_t ftn; void *arg; { register struct callout *p, *t; @@ -400,8 +420,6 @@ stopprofclock(p) } } -int dk_ndrive = DK_NDRIVE; - /* * Statistics clock. Grab profile sample, and if divider reaches 0, * do process and kernel statistics. diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index c963fdae4feb..5b365f5549c2 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id$ + * $Id: kern_clock.c,v 1.3 1994/08/02 07:41:54 davidg Exp $ */ #include @@ -53,6 +53,26 @@ #include #endif +/* Does anybody else really care about these? */ +struct callout *callfree, *callout, calltodo; +int ncallout; + +/* Some of these don't belong here, but it's easiest to concentrate them. */ +long cp_time[CPUSTATES]; +long dk_seek[DK_NDRIVE]; +long dk_time[DK_NDRIVE]; +long dk_wds[DK_NDRIVE]; +long dk_wpms[DK_NDRIVE]; +long dk_xfer[DK_NDRIVE]; + +int dk_busy; +int dk_ndrive = DK_NDRIVE; + +long tk_cancc; +long tk_nin; +long tk_nout; +long tk_rawcc; + /* * Clock handling routines. * @@ -257,7 +277,7 @@ softclock() */ void timeout(ftn, arg, ticks) - void (*ftn) __P((void *)); + timeout_t ftn; void *arg; register int ticks; { @@ -302,7 +322,7 @@ timeout(ftn, arg, ticks) void untimeout(ftn, arg) - void (*ftn) __P((void *)); + timeout_t ftn; void *arg; { register struct callout *p, *t; @@ -400,8 +420,6 @@ stopprofclock(p) } } -int dk_ndrive = DK_NDRIVE; - /* * Statistics clock. Grab profile sample, and if divider reaches 0, * do process and kernel statistics. diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index 8f9b72b2b254..216c75033504 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_xxx.c 8.2 (Berkeley) 11/14/93 - * $Id: kern_xxx.c,v 1.3 1994/08/02 07:42:23 davidg Exp $ + * $Id: kern_xxx.c,v 1.4 1994/08/08 00:30:04 wollman Exp $ */ #include @@ -43,9 +43,6 @@ #include #include -extern char domainname[MAXHOSTNAMELEN]; -extern int domainnamelen; - struct reboot_args { int opt; }; @@ -103,8 +100,6 @@ osethostname(p, uap, retval) return (kern_sysctl(&name, 1, 0, 0, uap->hostname, uap->len)); } -extern long hostid; - struct gethostid_args { int dummy; }; diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 21cdac65faee..58c0090e22c2 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.27 1994/08/01 11:25:28 davidg Exp $ + * $Id: trap.c,v 1.28 1994/08/10 04:39:47 wollman Exp $ */ /* @@ -73,8 +73,6 @@ int trap_pfault __P((struct trapframe *, int)); void trap_fatal __P((struct trapframe *)); -extern int grow(struct proc *,u_int); - struct sysent sysent[]; int nsysent; diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 9acd2003f332..2e886d39eb8f 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -28,10 +28,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sys_process.c,v 1.4 1994/08/08 13:00:14 davidg Exp $ + * $Id: sys_process.c,v 1.5 1994/08/13 03:50:25 wollman Exp $ */ #include +#include #include #include #include @@ -83,7 +84,8 @@ pread (struct proc *procp, unsigned int addr, unsigned int *retval) { rv = vm_map_pageable (kernel_map, kva, kva + PAGE_SIZE, 0); if (!rv) { *retval = 0; - bcopy (kva + page_offset, retval, sizeof *retval); + bcopy ((caddr_t)kva + page_offset, + retval, sizeof *retval); } vm_map_remove (kernel_map, kva, kva + PAGE_SIZE); } @@ -174,7 +176,7 @@ pwrite (struct proc *procp, unsigned int addr, unsigned int datum) { rv = vm_map_pageable (kernel_map, kva, kva + PAGE_SIZE, 0); if (!rv) { - bcopy (&datum, kva + page_offset, sizeof datum); + bcopy (&datum, (caddr_t)kva + page_offset, sizeof datum); } vm_map_remove (kernel_map, kva, kva + PAGE_SIZE); } diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 810e28d1371e..594dd7ba0c51 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vfs_bio.c,v 1.7 1994/08/07 14:53:20 davidg Exp $ + * $Id: vfs_bio.c,v 1.8 1994/08/08 15:40:59 wollman Exp $ */ #include @@ -35,6 +35,8 @@ struct buf *buf; /* buffer header pool */ int nbuf; /* number of buffer headers calculated elsewhere */ +struct swqueue bswlist; +struct buf *bclnlist; /* Head of cleaned page list. */ extern vm_map_t buffer_map, io_map; diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index a1a24f8ea2dd..d088b28bf317 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 - * $Id$ + * $Id: vfs_subr.c,v 1.3 1994/08/02 07:43:27 davidg Exp $ */ /* @@ -240,7 +240,6 @@ vattr_null(vap) extern int (**dead_vnodeop_p)(); extern void vclean(); long numvnodes; -extern struct vattr va_null; /* * Return the next vnode from the free list. diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 6b11461ec8e3..48aac34dc148 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -36,11 +36,12 @@ * SUCH DAMAGE. * * @(#)vfs_init.c 8.3 (Berkeley) 1/4/94 - * $Id$ + * $Id: vfs_init.c,v 1.3 1994/08/02 07:43:22 davidg Exp $ */ #include +#include #include #include #include diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index bd51adcc9bf9..50c48ad3d9ad 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -36,10 +36,11 @@ * SUCH DAMAGE. * * @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94 - * $Id$ + * $Id: vfs_lookup.c,v 1.2 1994/08/02 07:43:25 davidg Exp $ */ #include +#include #include #include #include diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index a1a24f8ea2dd..d088b28bf317 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 - * $Id$ + * $Id: vfs_subr.c,v 1.3 1994/08/02 07:43:27 davidg Exp $ */ /* @@ -240,7 +240,6 @@ vattr_null(vap) extern int (**dead_vnodeop_p)(); extern void vclean(); long numvnodes; -extern struct vattr va_null; /* * Return the next vnode from the free list. diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c index 0d925939fb2a..b1166d1747ca 100644 --- a/sys/miscfs/kernfs/kernfs_vnops.c +++ b/sys/miscfs/kernfs/kernfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)kernfs_vnops.c 8.6 (Berkeley) 2/10/94 - * $Id$ + * $Id: kernfs_vnops.c,v 1.3 1994/08/02 07:45:04 davidg Exp $ */ /* @@ -376,7 +376,11 @@ kernfs_getattr(ap) vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; /* vap->va_qsize = 0; */ vap->va_blocksize = DEV_BSIZE; - microtime(&vap->va_atime); + { + struct timeval tv; + microtime(&tv); + TIMEVAL_TO_TIMESPEC(&tv, &vap->va_atime); + } vap->va_mtime = vap->va_atime; vap->va_ctime = vap->va_ctime; vap->va_gen = 0; diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c index b5c9c7d9226a..9d161098442c 100644 --- a/sys/miscfs/procfs/procfs_vfsops.c +++ b/sys/miscfs/procfs/procfs_vfsops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: procfs_vfsops.c,v 1.2 1994/05/25 09:08:33 rgrimes Exp $ + * $Id: procfs_vfsops.c,v 1.3 1994/08/02 07:45:23 davidg Exp $ */ /* @@ -44,6 +44,7 @@ */ #include +#include #include #include #include diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index e06d1316e98e..7e59301f6b41 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.6 (Berkeley) 2/7/94 * - * $Id: procfs_vnops.c,v 1.2 1994/05/25 09:08:39 rgrimes Exp $ + * $Id: procfs_vnops.c,v 1.3 1994/08/02 07:45:25 davidg Exp $ */ /* @@ -376,7 +376,11 @@ procfs_getattr(ap) * p_stat structure is not addressible if u. gets * swapped out for that process. */ - microtime(&vap->va_ctime); + { + struct timeval tv; + microtime(&tv); + TIMEVAL_TO_TIMESPEC(&tv, &vap->va_ctime); + } vap->va_atime = vap->va_mtime = vap->va_ctime; /* diff --git a/sys/net/if.c b/sys/net/if.c index 76718e29acbe..02741d03d24e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.4 1994/08/08 10:58:30 davidg Exp $ + * $Id: if.c,v 1.5 1994/08/08 11:43:44 davidg Exp $ */ #include @@ -49,7 +49,6 @@ #include int ifqmaxlen = IFQ_MAXLEN; -void if_slowtimo __P((void *arg)); /* * Network interface utility routines. @@ -97,13 +96,13 @@ if_attach(ifp) struct ifnet *ifp; { unsigned socksize, ifasize; - int namelen, unitlen, masklen, ether_output(); + int namelen, unitlen, masklen; char workbuf[12], *unitname; register struct ifnet **p = &ifnet; register struct sockaddr_dl *sdl; register struct ifaddr *ifa; static int if_indexlim = 8; - extern void link_rtrequest(); + while (*p) p = &((*p)->if_next); diff --git a/sys/net/if.h b/sys/net/if.h index 107d7e705a8c..3b1e6d83f8ab 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.h 8.1 (Berkeley) 6/10/93 - * $Id: if.h,v 1.3 1994/08/02 07:46:07 davidg Exp $ + * $Id: if.h,v 1.4 1994/08/08 10:49:19 davidg Exp $ */ /* @@ -343,7 +343,7 @@ void if_up __P((struct ifnet *)); void ifubareset __P((int)); #endif int ifconf __P((int, caddr_t)); -void ifinit __P((void)); +/*void ifinit __P((void));*/ /* declared in systm.h for main() */ int ifioctl __P((struct socket *, int, caddr_t, struct proc *)); int ifpromisc __P((struct ifnet *, int)); struct ifnet *ifunit __P((char *)); diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 7865c3c41d90..df83d3ea9711 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_sl.c 8.6 (Berkeley) 2/1/94 - * $Id$ + * $Id: if_sl.c,v 1.3 1994/08/02 07:46:20 davidg Exp $ */ /* @@ -71,6 +71,7 @@ #include "bpfilter.h" #include +#include #include #include #include @@ -177,8 +178,6 @@ struct sl_softc sl_softc[NSL]; #define TRANS_FRAME_END 0xdc /* transposed frame end */ #define TRANS_FRAME_ESCAPE 0xdd /* transposed frame esc */ -extern struct timeval time; - static int slinit __P((struct sl_softc *)); static struct mbuf *sl_btom __P((struct sl_softc *, int)); diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c index 41c72fab6cf3..f52ea56ccd6f 100644 --- a/sys/net/raw_usrreq.c +++ b/sys/net/raw_usrreq.c @@ -31,10 +31,11 @@ * SUCH DAMAGE. * * @(#)raw_usrreq.c 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: raw_usrreq.c,v 1.2 1994/08/02 07:46:38 davidg Exp $ */ #include +#include #include #include #include diff --git a/sys/net/slcompress.c b/sys/net/slcompress.c index 4439ce4b5f47..bebeeab2acef 100644 --- a/sys/net/slcompress.c +++ b/sys/net/slcompress.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)slcompress.c 8.2 (Berkeley) 4/16/94 - * $Id$ + * $Id: slcompress.c,v 1.2 1994/08/02 07:46:46 davidg Exp $ */ /* @@ -44,6 +44,7 @@ */ #include +#include #include #include diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 3b9e3d84ec09..7eb446290df1 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: if_ether.c,v 1.2 1994/08/02 07:47:59 davidg Exp $ */ /* @@ -85,7 +85,6 @@ static struct llinfo_arp *arplookup __P((u_long, int, int)); static void in_arpinput __P((struct mbuf *)); extern struct ifnet loif; -extern struct timeval time; struct llinfo_arp llinfo_arp = {&llinfo_arp, &llinfo_arp}; struct ifqueue arpintrq = {0, 0, 0, 50}; int arp_inuse, arp_allocated, arp_intimer; diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index db5a3da5e50e..f971b95606d8 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.h 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: if_ether.h,v 1.2 1994/08/02 07:48:01 davidg Exp $ */ /* @@ -138,20 +138,19 @@ struct sockaddr_inarp { #define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */ #ifdef KERNEL -u_char etherbroadcastaddr[6]; -u_char ether_ipmulticast_min[6]; -u_char ether_ipmulticast_max[6]; -struct ifqueue arpintrq; +extern u_char etherbroadcastaddr[6]; +extern u_char ether_ipmulticast_min[6]; +extern u_char ether_ipmulticast_max[6]; +extern struct ifqueue arpintrq; struct llinfo_arp *arptnew __P((struct in_addr *)); -struct llinfo_arp llinfo_arp; /* head of the llinfo queue */ +extern struct llinfo_arp llinfo_arp; /* head of the llinfo queue */ void arpwhohas __P((struct arpcom *, struct in_addr *)); void arpintr __P((void)); int arpresolve __P((struct arpcom *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *)); void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *)); -void arpwhohas __P((struct arpcom *, struct in_addr *)); int ether_addmulti __P((struct ifreq *, struct arpcom *)); int ether_delmulti __P((struct ifreq *, struct arpcom *)); diff --git a/sys/netinet/in.c b/sys/netinet/in.c index a070c6d5f34c..05bd4ca045ae 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in.c 8.2 (Berkeley) 11/15/93 - * $Id$ + * $Id: in.c,v 1.3 1994/08/02 07:48:12 davidg Exp $ */ #include @@ -409,7 +409,7 @@ in_ifinit(ifp, ia, sin, scrub) { register u_long i = ntohl(sin->sin_addr.s_addr); struct sockaddr_in oldaddr; - int s = splimp(), flags = RTF_UP, error, ether_output(); + int s = splimp(), flags = RTF_UP, error; oldaddr = ia->ia_addr; ia->ia_addr = *sin; diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 544d8017a371..c6ecabb4d8b3 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in_var.h 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: in_var.h,v 1.3 1994/08/02 07:48:28 davidg Exp $ */ /* @@ -78,8 +78,6 @@ struct in_aliasreq { #ifdef KERNEL extern struct in_ifaddr *in_ifaddr; extern struct ifqueue ipintrq; /* ip packet input queue */ -void in_socktrim __P((struct sockaddr_in *)); - /* * Macro for finding the interface (ifnet structure) corresponding to one diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 38c341d82e9f..4841fb1e4bea 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 - * $Id$ + * $Id: ip_input.c,v 1.3 1994/08/02 07:48:38 davidg Exp $ */ #include @@ -80,6 +80,9 @@ int ipqmaxlen = IFQ_MAXLEN; struct in_ifaddr *in_ifaddr; /* first inet address */ struct ifqueue ipintrq; +struct ipstat ipstat; +struct ipq ipq; + /* * We need to save the IP options in case a protocol wants to respond * to an incoming packet over the same route if the packet got here diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index f20ab71c85a5..994cc980f5cc 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 - * $Id$ + * $Id: ip_output.c,v 1.4 1994/08/02 07:48:45 davidg Exp $ */ #include @@ -57,6 +57,8 @@ #include #endif +u_short ip_id; + static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *)); static void ip_mloopback __P((struct ifnet *, struct mbuf *, struct sockaddr_in *)); diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index c5bd50cc9461..04ec94d4d2b4 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_var.h 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: ip_var.h,v 1.2 1994/08/02 07:48:47 davidg Exp $ */ /* @@ -148,12 +148,11 @@ struct ipstat { #define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */ #define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */ -struct ipstat ipstat; -struct ipq ipq; /* ip reass. queue */ -u_short ip_id; /* ip packet ctr, for ids */ -int ip_defttl; /* default IP ttl */ +extern struct ipstat ipstat; +extern struct ipq ipq; /* ip reass. queue */ +extern u_short ip_id; /* ip packet ctr, for ids */ +extern int ip_defttl; /* default IP ttl */ -int in_control __P((struct socket *, int, caddr_t, struct ifnet *)); int ip_ctloutput __P((int, struct socket *, int, int, struct mbuf **)); void ip_deq __P((struct ipasfrag *)); int ip_dooptions __P((struct mbuf *)); diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index d6e779bde4df..674b7d919d85 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_input.c 8.5 (Berkeley) 4/10/94 - * $Id$ + * $Id: tcp_input.c,v 1.5 1994/08/02 07:49:01 davidg Exp $ */ #ifndef TUBA_INCLUDE @@ -64,8 +64,6 @@ int tcprexmtthresh = 3; struct tcpiphdr tcp_saveti; struct inpcb *tcp_last_inpcb = &tcb; -extern u_long sb_max; - #endif /* TUBA_INCLUDE */ #define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ) diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index d6e779bde4df..674b7d919d85 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_input.c 8.5 (Berkeley) 4/10/94 - * $Id$ + * $Id: tcp_input.c,v 1.5 1994/08/02 07:49:01 davidg Exp $ */ #ifndef TUBA_INCLUDE @@ -64,8 +64,6 @@ int tcprexmtthresh = 3; struct tcpiphdr tcp_saveti; struct inpcb *tcp_last_inpcb = &tcb; -extern u_long sb_max; - #endif /* TUBA_INCLUDE */ #define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ) diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index 381d8e34b5c6..fe28e7cb0b17 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94 - * $Id: nfs_bio.c,v 1.3 1994/08/02 07:52:05 davidg Exp $ + * $Id: nfs_bio.c,v 1.4 1994/08/08 09:11:41 davidg Exp $ */ #include @@ -56,7 +56,7 @@ #include #include -struct buf *incore(), *nfs_getcacheblk(); +struct buf *nfs_getcacheblk(); extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON]; extern int nfs_numasync; diff --git a/sys/nfs/nfsv2.h b/sys/nfs/nfsv2.h index 0b1d347bae79..fb557c825251 100644 --- a/sys/nfs/nfsv2.h +++ b/sys/nfs/nfsv2.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfsv2.h 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: nfsv2.h,v 1.2 1994/08/02 07:52:26 davidg Exp $ */ /* @@ -123,7 +123,6 @@ #define NFS_NPROCS 23 /* Conversion macros */ -extern int vttoif_tab[]; #define vtonfs_mode(t,m) \ txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \ MAKEIMODE((t), (m))) diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 381d8e34b5c6..fe28e7cb0b17 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94 - * $Id: nfs_bio.c,v 1.3 1994/08/02 07:52:05 davidg Exp $ + * $Id: nfs_bio.c,v 1.4 1994/08/08 09:11:41 davidg Exp $ */ #include @@ -56,7 +56,7 @@ #include #include -struct buf *incore(), *nfs_getcacheblk(); +struct buf *nfs_getcacheblk(); extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON]; extern int nfs_numasync; diff --git a/sys/sys/bio.h b/sys/sys/bio.h index 5ce8da185e97..7072545446dc 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)buf.h 8.7 (Berkeley) 1/21/94 - * $Id: buf.h,v 1.4 1994/08/02 07:52:39 davidg Exp $ + * $Id: buf.h,v 1.5 1994/08/06 09:15:33 davidg Exp $ */ #ifndef _SYS_BUF_H_ @@ -177,14 +177,14 @@ TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES]; #define B_SYNC 0x02 /* Do all allocations synchronously. */ #ifdef KERNEL -int nbuf; /* The number of buffer headers */ -struct buf *buf; /* The buffer headers. */ -char *buffers; /* The buffer contents. */ -int bufpages; /* Number of memory pages in the buffer pool. */ -struct buf *swbuf; /* Swap I/O buffer headers. */ -int nswbuf; /* Number of swap I/O buffer headers. */ -TAILQ_HEAD(swqueue, buf) bswlist; -struct buf *bclnlist; /* Head of cleaned page list. */ +extern int nbuf; /* The number of buffer headers */ +extern struct buf *buf; /* The buffer headers. */ +extern char *buffers; /* The buffer contents. */ +extern int bufpages; /* Number of memory pages in the buffer pool. */ +extern struct buf *swbuf; /* Swap I/O buffer headers. */ +extern int nswbuf; /* Number of swap I/O buffer headers. */ +extern TAILQ_HEAD(swqueue, buf) bswlist; +extern struct buf *bclnlist; /* Head of cleaned page list. */ __BEGIN_DECLS void allocbuf __P((struct buf *, int)); diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 5ce8da185e97..7072545446dc 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)buf.h 8.7 (Berkeley) 1/21/94 - * $Id: buf.h,v 1.4 1994/08/02 07:52:39 davidg Exp $ + * $Id: buf.h,v 1.5 1994/08/06 09:15:33 davidg Exp $ */ #ifndef _SYS_BUF_H_ @@ -177,14 +177,14 @@ TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES]; #define B_SYNC 0x02 /* Do all allocations synchronously. */ #ifdef KERNEL -int nbuf; /* The number of buffer headers */ -struct buf *buf; /* The buffer headers. */ -char *buffers; /* The buffer contents. */ -int bufpages; /* Number of memory pages in the buffer pool. */ -struct buf *swbuf; /* Swap I/O buffer headers. */ -int nswbuf; /* Number of swap I/O buffer headers. */ -TAILQ_HEAD(swqueue, buf) bswlist; -struct buf *bclnlist; /* Head of cleaned page list. */ +extern int nbuf; /* The number of buffer headers */ +extern struct buf *buf; /* The buffer headers. */ +extern char *buffers; /* The buffer contents. */ +extern int bufpages; /* Number of memory pages in the buffer pool. */ +extern struct buf *swbuf; /* Swap I/O buffer headers. */ +extern int nswbuf; /* Number of swap I/O buffer headers. */ +extern TAILQ_HEAD(swqueue, buf) bswlist; +extern struct buf *bclnlist; /* Head of cleaned page list. */ __BEGIN_DECLS void allocbuf __P((struct buf *, int)); diff --git a/sys/sys/callout.h b/sys/sys/callout.h index 67ad0d6ed3d6..ab914689d5cb 100644 --- a/sys/sys/callout.h +++ b/sys/sys/callout.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)callout.h 8.2 (Berkeley) 1/21/94 - * $Id$ + * $Id: callout.h,v 1.2 1994/08/02 07:52:40 davidg Exp $ */ struct callout { @@ -47,6 +47,6 @@ struct callout { }; #ifdef KERNEL -struct callout *callfree, *callout, calltodo; -int ncallout; +extern struct callout *callfree, *callout, calltodo; +extern int ncallout; #endif diff --git a/sys/sys/dkstat.h b/sys/sys/dkstat.h index 5cc6bdd843cd..2486ddbfcff1 100644 --- a/sys/sys/dkstat.h +++ b/sys/sys/dkstat.h @@ -36,9 +36,12 @@ * SUCH DAMAGE. * * @(#)dkstat.h 8.2 (Berkeley) 1/21/94 - * $Id$ + * $Id: dkstat.h,v 1.2 1994/08/02 07:52:51 davidg Exp $ */ +#ifndef _SYS_DKSTAT_H_ +#define _SYS_DKSTAT_H_ 1 + #define CP_USER 0 #define CP_NICE 1 #define CP_SYS 2 @@ -48,18 +51,20 @@ #define DK_NDRIVE 8 #ifdef KERNEL -long cp_time[CPUSTATES]; -long dk_seek[DK_NDRIVE]; -long dk_time[DK_NDRIVE]; -long dk_wds[DK_NDRIVE]; -long dk_wpms[DK_NDRIVE]; -long dk_xfer[DK_NDRIVE]; +extern long cp_time[CPUSTATES]; +extern long dk_seek[DK_NDRIVE]; +extern long dk_time[DK_NDRIVE]; +extern long dk_wds[DK_NDRIVE]; +extern long dk_wpms[DK_NDRIVE]; +extern long dk_xfer[DK_NDRIVE]; -int dk_busy; -int dk_ndrive; +extern int dk_busy; +extern int dk_ndrive; -long tk_cancc; -long tk_nin; -long tk_nout; -long tk_rawcc; +extern long tk_cancc; +extern long tk_nin; +extern long tk_nout; +extern long tk_rawcc; #endif + +#endif /* _SYS_DKSTAT_H_ */ diff --git a/sys/sys/imgact.h b/sys/sys/imgact.h index a32f4df7a6d0..3517e801602b 100644 --- a/sys/sys/imgact.h +++ b/sys/sys/imgact.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: imgact.h,v 1.3 1994/05/25 09:14:16 rgrimes Exp $ + * $Id: imgact.h,v 1.4 1994/08/13 03:50:34 wollman Exp $ */ #ifndef __h_imgact @@ -58,8 +58,14 @@ struct image_params { struct execsw { int (*ex_imgact)(struct image_params *); + const char *ex_name; }; +#ifdef KERNEL extern const struct execsw **execsw; +extern int exec_extract_strings(struct image_params *); +extern int exec_new_vmspace(struct image_params *); +#endif + #endif /* __h_imgact */ diff --git a/sys/sys/msgbuf.h b/sys/sys/msgbuf.h index d47058b20666..87f85522bc00 100644 --- a/sys/sys/msgbuf.h +++ b/sys/sys/msgbuf.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)msgbuf.h 8.1 (Berkeley) 6/2/93 - * $Id$ + * $Id: msgbuf.h,v 1.2 1994/08/02 07:53:16 davidg Exp $ */ #define MSG_BSIZE (4096 - 3 * sizeof(long)) @@ -43,5 +43,5 @@ struct msgbuf { char msg_bufc[MSG_BSIZE]; /* buffer */ }; #ifdef KERNEL -struct msgbuf *msgbufp; +extern struct msgbuf *msgbufp; #endif diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 98940e14aee0..849fffa6cbd9 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)proc.h 8.8 (Berkeley) 1/21/94 - * $Id$ + * $Id: proc.h,v 1.3 1994/08/02 07:53:20 davidg Exp $ */ #ifndef _SYS_PROC_H_ @@ -239,12 +239,12 @@ extern struct proc proc0; /* Process slot for swapper. */ extern int nprocs, maxproc; /* Current and max number of procs. */ extern int pidhashmask; /* In param.c. */ -volatile struct proc *allproc; /* List of active procs. */ -struct proc *zombproc; /* List of zombie procs. */ -struct proc *initproc, *pageproc; /* Process slots for init, pager. */ +extern volatile struct proc *allproc; /* List of active procs. */ +extern struct proc *zombproc; /* List of zombie procs. */ +extern struct proc *initproc, *pageproc; /* Process slots for init, pager. */ #define NQS 32 /* 32 run queues. */ -int whichqs; /* Bit mask summary of non-empty Q's. */ +extern int whichqs; /* Bit mask summary of non-empty Q's. */ struct prochd { struct proc *ph_link; /* Linked list of running processes. */ struct proc *ph_rlink; @@ -261,5 +261,8 @@ void sleep __P((void *chan, int pri)); int tsleep __P((void *chan, int pri, char *wmesg, int timo)); void unsleep __P((struct proc *)); void wakeup __P((void *chan)); + +extern int chgproccnt(uid_t, int); + #endif /* KERNEL */ #endif /* !_SYS_PROC_H_ */ diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 82719376b419..6ded3a64b223 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)socketvar.h 8.1 (Berkeley) 6/2/93 - * $Id$ + * $Id: socketvar.h,v 1.2 1994/08/02 07:53:36 davidg Exp $ */ #include /* for struct selinfo */ @@ -189,7 +189,7 @@ struct socket { #define sowwakeup(so) sowakeup((so), &(so)->so_snd) #ifdef KERNEL -u_long sb_max; +extern u_long sb_max; /* to catch callers missing new second argument to sonewconn: */ #define sonewconn(head, connstatus) sonewconn1((head), (connstatus)) struct socket *sonewconn1 __P((struct socket *head, int connstatus)); diff --git a/sys/sys/syslog.h b/sys/sys/syslog.h index 821f6a7c56bc..2f4e2383374c 100644 --- a/sys/sys/syslog.h +++ b/sys/sys/syslog.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)syslog.h 8.1 (Berkeley) 6/2/93 - * $Id$ + * $Id: syslog.h,v 1.2 1994/08/02 07:53:43 davidg Exp $ */ #define _PATH_LOG "/dev/log" @@ -165,7 +165,9 @@ CODE facilitynames[] = { #define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */ #define LOG_PERROR 0x20 /* log to stderr as well */ -#ifndef KERNEL +#ifdef KERNEL + +#else /* not KERNEL */ /* * Don't use va_list in the vsyslog() prototype. Va_list is typedef'd in two diff --git a/sys/sys/systm.h b/sys/sys/systm.h index a4b51e64d84b..01d9a5220e3e 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)systm.h 8.4 (Berkeley) 2/23/94 - * $Id: systm.h,v 1.5 1994/08/05 09:28:55 davidg Exp $ + * $Id: systm.h,v 1.6 1994/08/13 14:21:58 davidg Exp $ */ #include @@ -123,6 +123,7 @@ void tablefull __P((const char *)); void addlog __P((const char *, ...)); void log __P((int, const char *, ...)); void printf __P((const char *, ...)); +void uprintf __P((const char *, ...)); int sprintf __P((char *buf, const char *, ...)); void ttyprintf __P((struct tty *, const char *, ...)); @@ -148,9 +149,6 @@ int suword __P((void *base, int word)); int suiword __P((void *base, int word)); int hzto __P((struct timeval *tv)); -typedef void (*timeout_func_t)(void *); -void timeout __P((void (*func)(void *), void *arg, int ticks)); -void untimeout __P((void (*func)(void *), void *arg)); void realitexpire __P((void *)); struct clockframe; @@ -165,3 +163,29 @@ void stopprofclock __P((struct proc *)); void setstatclockrate __P((int hzrate)); #include + +/* Initialize the world */ +extern void consinit(void); +extern void kmeminit(void); +extern void cpu_startup(void); +extern void usrinfoinit(void); +extern void rqinit(void); +extern void vfsinit(void); +extern void mbinit(void); +extern void clist_init(void); +extern void ifinit(void); +extern void domaininit(void); +extern void cpu_initclocks(void); +extern void vntblinit(void); +extern void nchinit(void); + +extern __dead void vm_pageout(void) __dead2; /* pagedaemon, called in proc 2 */ +extern __dead void vfs_update(void) __dead2; /* update, called in proc 3 */ +extern __dead void scheduler(void) __dead2; /* sched, called in process 0 */ + +/* Timeouts */ +typedef void (timeout_t)(void *); /* actual timeout function type */ +typedef timeout_t *timeout_func_t; /* a pointer to this type */ + +void timeout(timeout_func_t, void *, int); +void untimeout(timeout_func_t, void *); diff --git a/sys/sys/time.h b/sys/sys/time.h index 00b9e2e8da9e..4d68a33a405b 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)time.h 8.1 (Berkeley) 6/2/93 - * $Id$ + * $Id: time.h,v 1.2 1994/08/02 07:53:47 davidg Exp $ */ #ifndef _SYS_TIME_H_ @@ -106,7 +106,11 @@ struct clockinfo { int profhz; /* profiling clock frequency */ }; -#ifndef KERNEL +#ifdef KERNEL + +extern void microtime(struct timeval *); + +#else /* not KERNEL */ #include #ifndef _POSIX_SOURCE diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h index 00b9e2e8da9e..4d68a33a405b 100644 --- a/sys/sys/timetc.h +++ b/sys/sys/timetc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)time.h 8.1 (Berkeley) 6/2/93 - * $Id$ + * $Id: time.h,v 1.2 1994/08/02 07:53:47 davidg Exp $ */ #ifndef _SYS_TIME_H_ @@ -106,7 +106,11 @@ struct clockinfo { int profhz; /* profiling clock frequency */ }; -#ifndef KERNEL +#ifdef KERNEL + +extern void microtime(struct timeval *); + +#else /* not KERNEL */ #include #ifndef _POSIX_SOURCE diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 93957a427065..8b40a4175179 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.h 8.6 (Berkeley) 1/21/94 - * $Id$ + * $Id: tty.h,v 1.2 1994/08/02 07:53:54 davidg Exp $ */ #include @@ -178,7 +178,7 @@ extern char ttyin[], ttyout[], ttopen[], ttclos[], ttybg[], ttybuf[]; int b_to_q __P((char *cp, int cc, struct clist *q)); void catq __P((struct clist *from, struct clist *to)); -void clist_init __P((void)); +/* void clist_init __P((void)); */ /* defined in systm.h for main() */ int getc __P((struct clist *q)); void ndflush __P((struct clist *q, int cc)); int ndqb __P((struct clist *q, int flag)); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 2b4dc7dd3f9f..d630c4f6ae56 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ucred.h 8.2 (Berkeley) 1/4/94 - * $Id$ + * $Id: ucred.h,v 1.2 1994/08/02 07:54:00 davidg Exp $ */ #ifndef _SYS_UCRED_H_ @@ -52,9 +52,11 @@ struct ucred { #ifdef KERNEL #define crhold(cr) (cr)->cr_ref++ -struct ucred *crget(); -struct ucred *crcopy(); -struct ucred *crdup(); +struct ucred *crget(void); +struct ucred *crcopy(struct ucred *); +struct ucred *crdup(struct ucred *); +extern void crfree(struct ucred *); +extern int suser(struct ucred *, short *); #endif /* KERNEL */ #endif /* !_SYS_UCRED_H_ */ diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 9b1bb50adc29..ee2a3c12b9f7 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94 - * $Id$ + * $Id: ffs_extern.h,v 1.3 1994/08/02 07:54:19 davidg Exp $ */ struct buf; @@ -85,8 +85,6 @@ int ffs_vget __P((struct mount *, ino_t, struct vnode **)); int ffs_vptofh __P((struct vnode *, struct fid *)); int ffs_write __P((struct vop_write_args *)); -int bwrite(); /* FFS needs a bwrite routine. XXX */ - #ifdef DIAGNOSTIC void ffs_checkoverlap __P((struct buf *, struct inode *)); #endif diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index def856c66044..bd1ad2bb6ba0 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94 - * $Id$ + * $Id: ffs_vfsops.c,v 1.3 1994/08/02 07:54:24 davidg Exp $ */ #include @@ -88,7 +88,6 @@ extern u_long nextgennumber; int ffs_mountroot() { - extern struct vnode *rootvp; register struct fs *fs; register struct mount *mp; struct proc *p = curproc; /* XXX */ @@ -350,7 +349,6 @@ ffs_mountfs(devvp, mp, p) int havepart = 0, blks; int error, i, size; int ronly; - extern struct vnode *rootvp; /* * Disallow multiple mounts of the same device. diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c index 9238fb3f19ce..9d0259d74545 100644 --- a/sys/ufs/mfs/mfs_vfsops.c +++ b/sys/ufs/mfs/mfs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mfs_vfsops.c 8.4 (Berkeley) 4/16/94 - * $Id$ + * $Id: mfs_vfsops.c,v 1.3 1994/08/02 07:54:43 davidg Exp $ */ #include @@ -90,7 +90,6 @@ struct vfsops mfs_vfsops = { int mfs_mountroot() { - extern struct vnode *rootvp; register struct fs *fs; register struct mount *mp; struct proc *p = curproc; /* XXX */ diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index 567f30331782..5ca9bc9051e6 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_inode.c 8.4 (Berkeley) 1/21/94 - * $Id$ + * $Id: ufs_inode.c,v 1.2 1994/08/02 07:54:56 davidg Exp $ */ #include @@ -86,7 +86,6 @@ ufs_inactive(ap) register struct inode *ip = VTOI(vp); struct timeval tv; int mode, error; - extern int prtactive; if (prtactive && vp->v_usecount != 0) vprint("ffs_inactive: pushing active", vp); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index ad3d3db1899d..b6458871ec55 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$ * * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94 - * $Id: swap_pager.c,v 1.5 1994/08/06 09:15:36 davidg Exp $ + * $Id: swap_pager.c,v 1.6 1994/08/07 13:10:37 davidg Exp $ */ /* @@ -69,16 +69,13 @@ #define NPENDINGIO 16 #endif -extern int nswbuf; int nswiodone; extern int vm_pageout_rate_limit; static int cleandone; extern int hz; int swap_pager_full; extern vm_map_t pager_map; -extern int vm_pageout_pages_needed; extern int vm_swap_size; -extern struct vnode *swapdev_vp; #define MAX_PAGEOUT_CLUSTER 8 @@ -105,19 +102,6 @@ extern vm_map_t kernel_map; #define SWB_EMPTY (-1) -void swap_pager_init(void); -vm_pager_t swap_pager_alloc(caddr_t, vm_size_t, vm_prot_t, vm_offset_t); -void swap_pager_dealloc(vm_pager_t); -boolean_t swap_pager_getpage(vm_pager_t, vm_page_t, boolean_t); -boolean_t swap_pager_putpage(vm_pager_t, vm_page_t, boolean_t); -boolean_t swap_pager_getmulti(vm_pager_t, vm_page_t *, int, int, boolean_t); -boolean_t swap_pager_haspage(vm_pager_t, vm_offset_t); -int swap_pager_io(sw_pager_t, vm_page_t *, int, int, int); -void swap_pager_iodone(struct buf *); -boolean_t swap_pager_clean(); - -extern struct pagerops swappagerops; - struct swpclean swap_pager_done; /* list of compileted page cleans */ struct swpclean swap_pager_inuse; /* list of pending page cleans */ struct swpclean swap_pager_free; /* list of free pager clean structs */ @@ -145,8 +129,6 @@ struct pagerops swappagerops = { swap_pager_haspage }; -extern int nswbuf; - int npendingio = NPENDINGIO; int pendingiowait; int require_swap_init; @@ -169,8 +151,6 @@ static inline void swapsizecheck() { void swap_pager_init() { - extern int dmmin, dmmax; - dfltpagerops = &swappagerops; TAILQ_INIT(&swap_pager_list); diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 4fcfb977c4ca..2fc7aba46ffe 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -59,7 +59,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_glue.c,v 1.4 1994/08/04 03:06:43 davidg Exp $ + * $Id: vm_glue.c,v 1.5 1994/08/09 10:42:41 davidg Exp $ */ #include @@ -84,7 +84,6 @@ int avefree = 0; /* XXX */ int readbuffers = 0; /* XXX allow kgdb to read kernel buffer pool */ /* vm_map_t upages_map; */ -void swapout(struct proc *p); int kernacc(addr, len, rw) caddr_t addr; diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index c64c2df99644..072c90685207 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_kern.c,v 1.5 1994/08/07 13:10:39 davidg Exp $ + * $Id: vm_kern.c,v 1.6 1994/08/07 14:53:26 davidg Exp $ */ /* @@ -70,12 +70,23 @@ #include #include +#include +#include #include #include #include #include +vm_map_t buffer_map; +vm_map_t kernel_map; +vm_map_t kmem_map; +vm_map_t mb_map; +vm_map_t io_map; +vm_map_t clean_map; +vm_map_t pager_map; +vm_map_t phys_map; + /* * kmem_alloc_pageable: * @@ -117,7 +128,6 @@ vm_offset_t kmem_alloc(map, size) { vm_offset_t addr; register vm_offset_t offset; - extern vm_object_t kernel_object; vm_offset_t i; size = round_page(size); @@ -278,7 +288,6 @@ kmem_malloc(map, size, canwait) vm_map_entry_t entry; vm_offset_t addr; vm_page_t m; - extern vm_object_t kmem_object; if (map != kmem_map && map != mb_map) panic("kern_malloc_alloc: map != {kmem,mb}_map"); diff --git a/sys/vm/vm_kern.h b/sys/vm/vm_kern.h index 5c82528bc7a0..087dd378bb64 100644 --- a/sys/vm/vm_kern.h +++ b/sys/vm/vm_kern.h @@ -61,16 +61,20 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id$ + * $Id: vm_kern.h,v 1.3 1994/08/02 07:55:23 davidg Exp $ */ -/* Kernel memory management definitions. */ +#ifndef _VM_VM_KERN_H_ +#define _VM_VM_KERN_H_ 1 -vm_map_t buffer_map; -vm_map_t kernel_map; -vm_map_t kmem_map; -vm_map_t mb_map; -vm_map_t io_map; -vm_map_t clean_map; -vm_map_t pager_map; -vm_map_t phys_map; +/* Kernel memory management definitions. */ +extern vm_map_t buffer_map; +extern vm_map_t kernel_map; +extern vm_map_t kmem_map; +extern vm_map_t mb_map; +extern vm_map_t io_map; +extern vm_map_t clean_map; +extern vm_map_t pager_map; +extern vm_map_t phys_map; + +#endif /* _VM_VM_KERN_H_ */ diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 8ad42faf9818..48c6129f2bce 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.3 1994/08/02 07:55:25 davidg Exp $ + * $Id: vm_map.c,v 1.4 1994/08/04 19:40:47 davidg Exp $ */ /* @@ -141,7 +141,6 @@ vm_map_entry_t kentry_free; vm_map_t kmap_free; int kentry_count; -vm_map_t kmap_free; static vm_offset_t mapvm=0; static int mapvmpgcnt=0; @@ -241,7 +240,6 @@ vm_map_t vm_map_create(pmap, min, max, pageable) boolean_t pageable; { register vm_map_t result; - extern vm_map_t kmem_map; if (kmem_map == NULL) { result = kmap_free; @@ -292,7 +290,6 @@ vm_map_init(map, min, max, pageable) */ static struct vm_map_entry *mappool; static int mappoolcnt; -void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry); vm_map_entry_t vm_map_entry_create(map) @@ -371,7 +368,6 @@ vm_map_entry_dispose(map, entry) vm_map_t map; vm_map_entry_t entry; { - extern vm_map_t kernel_map, kmem_map, pager_map; int s; if (map == kernel_map || map == kmem_map || map == pager_map || diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 57b66ecc006b..3bdb0a26da17 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.3 1994/08/02 07:55:29 davidg Exp $ + * $Id: vm_object.c,v 1.4 1994/08/07 13:10:40 davidg Exp $ */ /* @@ -70,6 +70,8 @@ #include #include +#include +#include /* for curproc, pageproc */ #include #include @@ -77,9 +79,6 @@ #include static void _vm_object_allocate(vm_size_t, vm_object_t); -void vm_object_deactivate_pages(vm_object_t); -void vm_object_cache_trim(void); -void vm_object_remove(vm_pager_t); /* * Virtual memory objects maintain the actual data diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index d0b0d5aee50e..b56d71994631 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -65,7 +65,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.c,v 1.6 1994/08/04 03:06:47 davidg Exp $ + * $Id: vm_pageout.c,v 1.7 1994/08/06 09:15:39 davidg Exp $ */ /* @@ -732,8 +732,8 @@ vm_pageout_scan() void vm_pageout() { - extern npendingio, swiopend; - static nowakeup; + extern swiopend; + static int nowakeup; (void) spl0(); /* @@ -765,7 +765,6 @@ vm_pageout() */ while (TRUE) { int force_wakeup; - extern struct loadavg averunnable; /* cnt.v_free_min = 12 + averunnable.ldavg[0] / 1024; cnt.v_free_target = 2*cnt.v_free_min + cnt.v_free_reserved; diff --git a/sys/vm/vm_pageout.h b/sys/vm/vm_pageout.h index 5412ddba9bd7..66f0bbe9f76f 100644 --- a/sys/vm/vm_pageout.h +++ b/sys/vm/vm_pageout.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id$ + * $Id: vm_pageout.h,v 1.3 1994/08/02 07:55:34 davidg Exp $ */ /* @@ -91,7 +91,6 @@ extern int vm_pageout_pages_needed; #define VM_WAIT vm_wait() inline static void vm_wait() { - extern struct proc *curproc, *pageproc; int s; s = splhigh(); if (curproc == pageproc) { @@ -107,7 +106,6 @@ inline static void vm_wait() { #ifdef KERNEL -void vm_pageout __P((void)); int vm_pageout_scan __P((void)); void vm_pageout_page __P((vm_page_t, vm_object_t)); void vm_pageout_cluster __P((vm_page_t, vm_object_t)); diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index 47d3c3d0a65a..b080263872b8 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pager.c,v 1.5 1994/08/07 13:10:42 davidg Exp $ + * $Id: vm_pager.c,v 1.6 1994/08/07 14:53:27 davidg Exp $ */ /* @@ -187,7 +187,6 @@ vm_pager_get_pages(pager, m, count, reqpage, sync) int reqpage; boolean_t sync; { - extern boolean_t vm_page_zero_fill(); extern int vm_pageout_count; int i;