mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 06:12:01 +01:00
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.
This commit is contained in:
parent
fa074287a4
commit
f23b4c91c4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2112
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 *);
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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 <ddb/db_sym.h>
|
||||
#include <ddb/db_break.h>
|
||||
|
||||
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];
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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 <machine/db_machdep.h>
|
||||
|
||||
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 */
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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 <ddb/db_variables.h>
|
||||
#include <ddb/db_sym.h>
|
||||
|
||||
extern unsigned int db_maxoff;
|
||||
|
||||
void
|
||||
db_show_regs(db_expr_t dummy1, int dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
|
@ -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_ */
|
||||
|
@ -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 <ddb/db_command.h>
|
||||
#include <ddb/db_break.h>
|
||||
|
||||
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)
|
||||
|
@ -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 <ddb/db_lex.h>
|
||||
#include <ddb/db_variables.h>
|
||||
|
||||
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[] = {
|
||||
|
@ -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
|
||||
|
@ -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 */);
|
||||
|
@ -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;
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 *);
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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);
|
||||
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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);
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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();
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -53,6 +53,26 @@
|
||||
#include <sys/gmon.h>
|
||||
#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.
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -52,9 +52,10 @@
|
||||
|
||||
#include <machine/reg.h>
|
||||
|
||||
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;
|
||||
{
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -52,6 +52,8 @@
|
||||
#include <sys/acct.h>
|
||||
#include <sys/ktrace.h>
|
||||
|
||||
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[];
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/namei.h>
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -27,7 +27,6 @@
|
||||
#include <vm/vm.h>
|
||||
|
||||
static void physwakeup();
|
||||
u_int minphys(struct buf *bp);
|
||||
|
||||
int
|
||||
physio(strategy, bp, dev, rw, minp, uio)
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -50,6 +50,9 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
|
||||
volatile struct proc *allproc; /* all processes */
|
||||
struct proc *zombproc; /* just zombies */
|
||||
|
||||
void pgdelete __P((struct pgrp *));
|
||||
void fixjobc __P((struct proc *, struct pgrp *, int));
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -53,6 +53,26 @@
|
||||
#include <sys/gmon.h>
|
||||
#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.
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -53,6 +53,26 @@
|
||||
#include <sys/gmon.h>
|
||||
#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.
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -43,9 +43,6 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
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;
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/ptrace.h>
|
||||
@ -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);
|
||||
}
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/vnode.h>
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/syslimits.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/namei.h>
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -49,7 +49,6 @@
|
||||
#include <net/if_types.h>
|
||||
|
||||
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);
|
||||
|
@ -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 *));
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/buf.h>
|
||||
@ -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));
|
||||
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/domain.h>
|
||||
#include <sys/protosw.h>
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
@ -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;
|
||||
|
@ -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 *));
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -57,6 +57,8 @@
|
||||
#include <machine/mtpr.h>
|
||||
#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 *));
|
||||
|
@ -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 *));
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -56,7 +56,7 @@
|
||||
#include <nfs/nfsmount.h>
|
||||
#include <nfs/nqnfs.h>
|
||||
|
||||
struct buf *incore(), *nfs_getcacheblk();
|
||||
struct buf *nfs_getcacheblk();
|
||||
extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON];
|
||||
extern int nfs_numasync;
|
||||
|
||||
|
@ -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)))
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -56,7 +56,7 @@
|
||||
#include <nfs/nfsmount.h>
|
||||
#include <nfs/nqnfs.h>
|
||||
|
||||
struct buf *incore(), *nfs_getcacheblk();
|
||||
struct buf *nfs_getcacheblk();
|
||||
extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON];
|
||||
extern int nfs_numasync;
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
@ -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_ */
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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_ */
|
||||
|
@ -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 <sys/select.h> /* 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));
|
||||
|
@ -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
|
||||
|
@ -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 <machine/cpufunc.h>
|
||||
@ -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 <libkern/libkern.h>
|
||||
|
||||
/* 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 *);
|
||||
|
@ -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 <time.h>
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
|
@ -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 <time.h>
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
|
@ -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 <sys/termios.h>
|
||||
@ -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));
|
||||
|
@ -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_ */
|
||||
|
@ -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
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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.
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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 */
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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;
|
||||
|
@ -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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_page.h>
|
||||
#include <vm/vm_pageout.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
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");
|
||||
|
@ -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_ */
|
||||
|
@ -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 ||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user