summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog90
-rw-r--r--chips/busses.h10
-rw-r--r--ddb/db_break.c4
-rw-r--r--ddb/db_break.h4
-rw-r--r--ddb/db_command.c2
-rw-r--r--ddb/db_command.h7
-rw-r--r--ddb/db_lex.c12
-rw-r--r--ddb/db_lex.h24
-rw-r--r--ddb/db_output.c6
-rw-r--r--ddb/db_output.h6
-rw-r--r--ddb/db_sym.h22
-rw-r--r--ddb/db_task_thread.c2
-rw-r--r--ddb/db_task_thread.h12
-rw-r--r--ddb/db_variables.h7
-rw-r--r--ddb/db_watch.c6
-rw-r--r--ddb/db_watch.h16
-rw-r--r--device/buf.h2
-rw-r--r--device/conf.h2
-rw-r--r--device/dev_hdr.h14
-rw-r--r--device/ds_routines.h14
-rw-r--r--device/if_ether.h2
-rw-r--r--device/io_req.h2
-rw-r--r--device/net_io.h15
-rw-r--r--i386/i386/io_port.h4
-rw-r--r--i386/i386/lock.h2
-rw-r--r--i386/i386/mp_desc.c2
-rw-r--r--i386/i386/mp_desc.h2
-rw-r--r--i386/i386/proc_reg.h2
-rw-r--r--i386/i386/user_ldt.h4
-rw-r--r--i386/i386at/kd_queue.h8
-rw-r--r--i386/i386at/kdsoft.h42
-rw-r--r--i386/intel/pmap.c2
-rw-r--r--i386/intel/pmap.h4
-rw-r--r--include/mach/mach_traps.h8
-rw-r--r--ipc/ipc_entry.h18
-rw-r--r--ipc/ipc_hash.c2
-rw-r--r--ipc/ipc_hash.h44
-rw-r--r--ipc/ipc_kmsg.h38
-rw-r--r--ipc/ipc_marequest.c2
-rw-r--r--ipc/ipc_marequest.h18
-rw-r--r--ipc/ipc_mqueue.h16
-rw-r--r--ipc/ipc_notify.h14
-rw-r--r--ipc/ipc_object.h51
-rw-r--r--ipc/ipc_port.h49
-rw-r--r--ipc/ipc_pset.h14
-rw-r--r--ipc/ipc_right.h57
-rw-r--r--ipc/ipc_space.h4
-rw-r--r--ipc/ipc_table.h2
-rw-r--r--ipc/mach_msg.c4
-rw-r--r--ipc/mach_msg.h16
-rw-r--r--kern/ast.c2
-rw-r--r--kern/ast.h2
-rw-r--r--kern/debug.c2
-rw-r--r--kern/debug.h2
-rw-r--r--kern/ipc_tt.c2
-rw-r--r--kern/ipc_tt.h47
-rw-r--r--kern/mach_factor.c2
-rw-r--r--kern/mach_factor.h5
-rw-r--r--kern/printf.c2
-rw-r--r--kern/printf.h4
-rw-r--r--kern/queue.h10
-rw-r--r--kern/sched.h5
-rw-r--r--kern/syscall_subr.c12
-rw-r--r--kern/syscall_subr.h8
-rw-r--r--kern/task.h18
-rw-r--r--kern/thread_swap.c6
-rw-r--r--kern/thread_swap.h10
-rw-r--r--kern/timer.h18
-rw-r--r--kern/xpr.c4
-rw-r--r--kern/xpr.h10
-rw-r--r--kern/zalloc.c18
-rw-r--r--kern/zalloc.h6
72 files changed, 504 insertions, 401 deletions
diff --git a/ChangeLog b/ChangeLog
index 4cf3e2c..a8d8a50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,93 @@
+2007-04-30 Thomas Schwinge <tschwinge@gnu.org>
+
+ We're not in the eighties anymore. List arguments in function
+ prototypes and definitions for a lot of symbols. Also drop some unused
+ prototypes. I refrain from listing every changed symbol.
+ * chips/busses.h: Do as described.
+ * ddb/db_break.c: Likewise.
+ * ddb/db_break.h: Likewise.
+ * ddb/db_command.c: Likewise.
+ * ddb/db_command.h: Likewise.
+ * ddb/db_lex.c: Likewise.
+ * ddb/db_lex.h: Likewise.
+ * ddb/db_output.c: Likewise.
+ * ddb/db_output.h: Likewise.
+ * ddb/db_sym.h: Likewise.
+ * ddb/db_task_thread.c: Likewise.
+ * ddb/db_task_thread.h: Likewise.
+ * ddb/db_variables.h: Likewise.
+ * ddb/db_watch.c: Likewise.
+ * ddb/db_watch.h: Likewise.
+ * device/buf.h: Likewise.
+ * device/conf.h: Likewise.
+ * device/dev_hdr.h: Likewise.
+ * device/ds_routines.h: Likewise.
+ * device/if_ether.h: Likewise.
+ * device/io_req.h: Likewise.
+ * device/net_io.h: Likewise.
+ * i386/i386/io_port.h: Likewise.
+ * i386/i386/lock.h: Likewise.
+ * i386/i386/mp_desc.c: Likewise.
+ * i386/i386/mp_desc.h: Likewise.
+ * i386/i386/proc_reg.h: Likewise.
+ * i386/i386/user_ldt.h: Likewise.
+ * i386/i386at/kd_queue.h: Likewise.
+ * i386/i386at/kdsoft.h: Likewise.
+ * i386/intel/pmap.c: Likewise.
+ * i386/intel/pmap.h: Likewise.
+ * include/mach/mach_traps.h: Likewise.
+ * ipc/ipc_entry.h: Likewise.
+ * ipc/ipc_hash.h: Likewise.
+ * ipc/ipc_kmsg.h: Likewise.
+ * ipc/ipc_marequest.c: Likewise.
+ * ipc/ipc_marequest.h: Likewise.
+ * ipc/ipc_mqueue.h: Likewise.
+ * ipc/ipc_notify.h: Likewise.
+ * ipc/ipc_object.h: Likewise.
+ * ipc/ipc_port.h: Likewise.
+ * ipc/ipc_pset.h: Likewise.
+ * ipc/ipc_right.h: Likewise.
+ * ipc/ipc_space.h: Likewise.
+ * ipc/ipc_table.h: Likewise.
+ * ipc/mach_msg.c: Likewise.
+ * ipc/mach_msg.h: Likewise.
+ * kern/ast.c: Likewise.
+ * kern/ast.h: Likewise.
+ * kern/debug.c: Likewise.
+ * kern/debug.h: Likewise.
+ * kern/ipc_tt.c: Likewise.
+ * kern/ipc_tt.h: Likewise.
+ * kern/mach_factor.c: Likewise.
+ * kern/mach_factor.h: Likewise.
+ * kern/printf.c: Likewise.
+ * kern/printf.h: Likewise.
+ * kern/queue.h: Likewise.
+ * kern/sched.h: Likewise.
+ * kern/syscall_subr.c: Likewise.
+ * kern/syscall_subr.h: Likewise.
+ * kern/task.h: Likewise.
+ * kern/thread_swap.c: Likewise.
+ * kern/thread_swap.h: Likewise.
+ * kern/timer.h: Likewise.
+ * kern/xpr.c: Likewise.
+ * kern/xpr.h: Likewise.
+ * kern/zalloc.c: Likewise.
+ * kern/zalloc.h: Likewise.
+ * ipc/ipc_port.h: Don't include <ipc/ipc_space.h>.
+ * device/net_io.h: Include <device/if_hdr.h> and <device/io_req.h>.
+ * ipc/ipc_entry.h: Include <mach/mach_types.h> and <ipc/ipc_types.h>.
+ * ipc/ipc_kmsg.h: Include <ipc/ipc_object.h>, <ipc/ipc_types.h> and
+ <vm/vm_map.h>.
+ * ipc/ipc_marequest.h: Include <mach_debug/hash_info.h> and
+ <ipc/ipc_types.h>.
+ * ipc/ipc_object.h: Include <ipc/ipc_types.h>.
+ * ipc/ipc_right.h: Include <ipc/ipc_entry.h>.
+ * ipc/ipc_space.h: Include <mach/mach_types.h> and <ipc/ipc_types.h>.
+ * kern/ipc_tt.h: Include <mach/mach_types.h>.
+ * kern/sched.h: Include <kern/kern_types.h>.
+ * ipc/ipc_hash.c (ipc_hash_index_t): Move type definition...
+ * ipc/ipc_hash.h: ... into here.
+
2007-04-25 Thomas Schwinge <tschwinge@gnu.org>
* DEVELOPMENT: Add url.
diff --git a/chips/busses.h b/chips/busses.h
index 56a9ed3..1ff89f0 100644
--- a/chips/busses.h
+++ b/chips/busses.h
@@ -124,13 +124,13 @@ struct bus_device {
*/
struct bus_driver {
int (*probe)( /* see if the driver is there */
- /* vm_offset_t address,
- struct bus_ctlr * */ );
+ vm_offset_t address,
+ struct bus_ctlr *);
int (*slave)( /* see if any slave is there */
- /* struct bus_device *,
- vm_offset_t */ );
+ struct bus_device *,
+ vm_offset_t);
void (*attach)( /* setup driver after probe */
- /* struct bus_device * */);
+ struct bus_device *);
int (*dgo)(); /* start transfer */
vm_offset_t *addr; /* device csr addresses */
char *dname; /* name of a device */
diff --git a/ddb/db_break.c b/ddb/db_break.c
index f07e2cc..c8e12f5 100644
--- a/ddb/db_break.c
+++ b/ddb/db_break.c
@@ -384,7 +384,7 @@ db_find_breakpoint_here(task, addr)
boolean_t db_breakpoints_inserted = TRUE;
void
-db_set_breakpoints()
+db_set_breakpoints(void)
{
register db_breakpoint_t bkpt;
register task_t task;
@@ -429,7 +429,7 @@ db_set_breakpoints()
}
void
-db_clear_breakpoints()
+db_clear_breakpoints(void)
{
register db_breakpoint_t bkpt, *bkptp;
register task_t task;
diff --git a/ddb/db_break.h b/ddb/db_break.h
index 5909a62..ec7d880 100644
--- a/ddb/db_break.h
+++ b/ddb/db_break.h
@@ -72,8 +72,8 @@ typedef struct db_breakpoint *db_breakpoint_t;
extern db_breakpoint_t db_find_breakpoint( task_t task, db_addr_t addr);
extern boolean_t db_find_breakpoint_here( task_t task, db_addr_t addr);
-extern void db_set_breakpoints();
-extern void db_clear_breakpoints();
+extern void db_set_breakpoints(void);
+extern void db_clear_breakpoints(void);
extern db_thread_breakpoint_t db_find_thread_breakpoint_here
( task_t task, db_addr_t addr );
extern db_thread_breakpoint_t db_find_breakpoint_number
diff --git a/ddb/db_command.c b/ddb/db_command.c
index ec46ba4..1593e86 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -419,7 +419,7 @@ db_help_cmd()
int (*ddb_display)();
void
-db_command_loop()
+db_command_loop(void)
{
jmp_buf_t db_jmpbuf;
jmp_buf_t *prev = db_recover;
diff --git a/ddb/db_command.h b/ddb/db_command.h
index 7870baa..1c0d106 100644
--- a/ddb/db_command.h
+++ b/ddb/db_command.h
@@ -37,11 +37,10 @@
#include <machine/db_machdep.h>
#include <machine/setjmp.h>
-extern void db_command_loop();
-extern boolean_t db_exec_conditional_cmd();
-extern boolean_t db_option(/* char *, int */);
+extern void db_command_loop(void);
+extern boolean_t db_option(char *, int);
-extern void db_error(/* char * */); /* report error */
+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/ddb/db_lex.c b/ddb/db_lex.c
index 88ac212..ebffe06 100644
--- a/ddb/db_lex.c
+++ b/ddb/db_lex.c
@@ -74,7 +74,7 @@ db_read_line(repeat_last)
}
void
-db_flush_line()
+db_flush_line(void)
{
db_lp = db_line;
db_last_lp = db_lp;
@@ -115,7 +115,7 @@ db_restore_lex_context(lp)
}
int
-db_read_char()
+db_read_char(void)
{
int c;
@@ -145,7 +145,7 @@ db_unread_token(t)
}
int
-db_read_token()
+db_read_token(void)
{
int t;
@@ -167,7 +167,7 @@ char db_tok_string[TOK_STRING_SIZE];
db_expr_t db_radix = 16;
void
-db_flush_lex()
+db_flush_lex(void)
{
db_flush_line();
db_look_char = 0;
@@ -177,7 +177,7 @@ db_flush_lex()
#define DB_DISP_SKIP 40 /* number of chars to display skip */
void
-db_skip_to_eol()
+db_skip_to_eol(void)
{
register int skip;
register int t;
@@ -203,7 +203,7 @@ db_skip_to_eol()
}
int
-db_lex()
+db_lex(void)
{
register char *cp;
register int c;
diff --git a/ddb/db_lex.h b/ddb/db_lex.h
index 3cb9ae6..dc9da0a 100644
--- a/ddb/db_lex.h
+++ b/ddb/db_lex.h
@@ -41,18 +41,18 @@ struct db_lex_context {
char *l_eptr; /* line end pointer */
};
-extern int db_lex();
-extern int db_read_line(/* char *rep_str */);
-extern void db_flush_line();
-extern int db_read_char();
-extern void db_unread_char(/* char c */);
-extern int db_read_token();
-extern void db_unread_token(/* int t */);
-extern void db_flush_lex();
-extern void db_switch_input(/* char *, int */);
-extern void db_save_lex_context(/* struct db_lex_context * */);
-extern void db_restore_lex_context(/* struct db_lex_context * */);
-extern void db_skip_to_eol();
+extern int db_lex(void);
+extern int db_read_line(char *rep_str);
+extern void db_flush_line(void);
+extern int db_read_char(void);
+extern void db_unread_char(int c);
+extern int db_read_token(void);
+extern void db_unread_token(int t);
+extern void db_flush_lex(void);
+extern void db_switch_input(char *, int);
+extern void db_save_lex_context(struct db_lex_context *);
+extern void db_restore_lex_context(struct db_lex_context *);
+extern void db_skip_to_eol(void);
extern db_expr_t db_tok_number;
extern char db_tok_string[TOK_STRING_SIZE];
diff --git a/ddb/db_output.c b/ddb/db_output.c
index 44a71ab..57d6856 100644
--- a/ddb/db_output.c
+++ b/ddb/db_output.c
@@ -79,7 +79,7 @@ extern void db_check_interrupt();
* Force pending whitespace.
*/
void
-db_force_whitespace()
+db_force_whitespace(void)
{
register int last_print, next_tab;
@@ -189,7 +189,7 @@ db_id_putc(char c, vm_offset_t dummy)
* Return output position
*/
int
-db_print_position()
+db_print_position(void)
{
return (db_output_position);
}
@@ -197,7 +197,7 @@ db_print_position()
/*
* End line if too long.
*/
-void db_end_line()
+void db_end_line(void)
{
if (db_output_position >= db_max_width-1)
db_printf("\n");
diff --git a/ddb/db_output.h b/ddb/db_output.h
index 6667d19..3203e30 100644
--- a/ddb/db_output.h
+++ b/ddb/db_output.h
@@ -32,9 +32,9 @@
* Printing routines for kernel debugger.
*/
-extern void db_force_whitespace();
-extern int db_print_position();
-extern void db_end_line();
+extern void db_force_whitespace(void);
+extern int db_print_position(void);
+extern void db_end_line(void);
extern void db_printf( const char *fmt, ...);
extern void db_putchar(int c);
diff --git a/ddb/db_sym.h b/ddb/db_sym.h
index c2d5fec..216e327 100644
--- a/ddb/db_sym.h
+++ b/ddb/db_sym.h
@@ -150,42 +150,41 @@ extern void db_printsym( db_expr_t off, db_strategy_t strategy);
/*
* Symbol table switch, defines the interface
* to symbol-table specific routines.
- * [NOTE: incomplete prototypes cuz broken compiler]
*/
extern struct db_sym_switch {
boolean_t (*init)(
-/* char *start,
+ char *start,
char *end,
char *name,
char *task_addr
-*/ );
+ );
db_sym_t (*lookup)(
-/* db_symtab_t *stab,
+ db_symtab_t *stab,
char *symstr
-*/ );
+ );
db_sym_t (*search_symbol)(
-/* db_symtab_t *stab,
+ db_symtab_t *stab,
db_addr_t off,
db_strategy_t strategy,
db_expr_t *diffp
-*/ );
+ );
boolean_t (*line_at_pc)(
-/* db_symtab_t *stab,
+ db_symtab_t *stab,
db_sym_t sym,
char **file,
int *line,
db_expr_t pc
-*/ );
+ );
void (*symbol_values)(
-/* db_sym_t sym,
+ db_sym_t sym,
char **namep,
db_expr_t *valuep
-*/ );
+ );
} x_db[];
@@ -204,4 +203,3 @@ extern boolean_t db_line_at_pc(
char **filename,
int *linenum,
db_expr_t pc);
-
diff --git a/ddb/db_task_thread.c b/ddb/db_task_thread.c
index ba101fb..3762942 100644
--- a/ddb/db_task_thread.c
+++ b/ddb/db_task_thread.c
@@ -231,7 +231,7 @@ db_get_next_thread(threadp, position)
* ( it is called in entering DDB session )
*/
void
-db_init_default_thread()
+db_init_default_thread(void)
{
if (db_lookup_thread(db_default_thread) < 0) {
db_default_thread = THREAD_NULL;
diff --git a/ddb/db_task_thread.h b/ddb/db_task_thread.h
index 867cee6..ebf99d8 100644
--- a/ddb/db_task_thread.h
+++ b/ddb/db_task_thread.h
@@ -41,11 +41,11 @@
extern task_t db_default_task; /* default target task */
extern thread_t db_default_thread; /* default target thread */
-extern int db_lookup_task(/* task_t */);
-extern int db_lookup_thread(/* thread_t */);
-extern int db_lookup_task_thread(/* task_t, thread_t */);
-extern boolean_t db_check_thread_address_valid(/* db_expr_t */);
-extern boolean_t db_get_next_thread(/* thread_t *, int */);
-extern void db_init_default_thread();
+extern int db_lookup_task(task_t);
+extern int db_lookup_thread(thread_t);
+extern int db_lookup_task_thread(task_t, thread_t);
+extern boolean_t db_check_thread_address_valid(thread_t);
+extern boolean_t db_get_next_thread(thread_t *, int);
+extern void db_init_default_thread(void);
#endif /* _DDB_DB_TASK_THREAD_H_ */
diff --git a/ddb/db_variables.h b/ddb/db_variables.h
index b340c3d..c01a5e2 100644
--- a/ddb/db_variables.h
+++ b/ddb/db_variables.h
@@ -36,11 +36,13 @@
/*
* Debugger variables.
*/
+struct db_var_aux_param; /* forward */
+typedef struct db_var_aux_param *db_var_aux_param_t; /* forward */
struct db_variable {
char *name; /* Name of variable */
db_expr_t *valuep; /* pointer to value of variable */
/* function to call when reading/writing */
- int (*fcn)(/* db_variable, db_expr_t, int, db_var_aux_param_t */);
+ int (*fcn)(struct db_variable *, db_expr_t *, int, db_var_aux_param_t);
short min_level; /* number of minimum suffix levels */
short max_level; /* number of maximum suffix levels */
short low; /* low value of level 1 suffix */
@@ -67,7 +69,8 @@ struct db_var_aux_param {
thread_t thread; /* target task */
};
-typedef struct db_var_aux_param *db_var_aux_param_t;
+/* Already defined above. */
+/* typedef struct db_var_aux_param *db_var_aux_param_t; */
extern struct db_variable db_vars[]; /* debugger variables */
diff --git a/ddb/db_watch.c b/ddb/db_watch.c
index 4450676..072f474 100644
--- a/ddb/db_watch.c
+++ b/ddb/db_watch.c
@@ -150,7 +150,7 @@ db_delete_watchpoint(task, addr)
}
void
-db_list_watchpoints()
+db_list_watchpoints(void)
{
register db_watchpoint_t watch;
int task_id;
@@ -260,7 +260,7 @@ db_listwatch_cmd()
}
void
-db_set_watchpoints()
+db_set_watchpoints(void)
{
register db_watchpoint_t watch;
vm_map_t map;
@@ -278,7 +278,7 @@ db_set_watchpoints()
}
void
-db_clear_watchpoints()
+db_clear_watchpoints(void)
{
db_watchpoints_inserted = FALSE;
}
diff --git a/ddb/db_watch.h b/ddb/db_watch.h
index 2fb79fa..a7acb39 100644
--- a/ddb/db_watch.h
+++ b/ddb/db_watch.h
@@ -48,14 +48,14 @@ typedef struct db_watchpoint {
struct db_watchpoint *link; /* link in in-use or free chain */
} *db_watchpoint_t;
-extern boolean_t db_find_watchpoint(/* task_t task, db_addr_t addr,
- db_regs_t *regs */);
-extern void db_set_watchpoints();
-extern void db_clear_watchpoints();
-
-extern void db_set_watchpoint(/* task_t task, db_addr_t addr, vm_size_t size */);
-extern void db_delete_watchpoint(/* task_t task, db_addr_t addr */);
-extern void db_list_watchpoints();
+extern boolean_t db_find_watchpoint(vm_map_t map, db_addr_t addr,
+ db_regs_t *regs);
+extern void db_set_watchpoints(void);
+extern void db_clear_watchpoints(void);
+
+extern void db_set_watchpoint(task_t task, db_addr_t addr, vm_size_t size);
+extern void db_delete_watchpoint(task_t task, db_addr_t addr);
+extern void db_list_watchpoints(void);
#endif /* _DDB_DB_WATCH_ */
diff --git a/device/buf.h b/device/buf.h
index cf34694..cf53880 100644
--- a/device/buf.h
+++ b/device/buf.h
@@ -93,7 +93,7 @@
/*
* Export standard minphys routine.
*/
-extern minphys();
+extern minphys(io_req_t);
/*
* Alternate name for iodone
diff --git a/device/conf.h b/device/conf.h
index 7ca5dd6..e91e099 100644
--- a/device/conf.h
+++ b/device/conf.h
@@ -108,7 +108,7 @@ extern int dev_indirect_count;
/*
* Exported routine to set indirection.
*/
-extern void dev_set_indirect();
+extern void dev_set_indirect(char *, dev_ops_t, int);
#endif /* _DEVICE_CONF_H_ */
diff --git a/device/dev_hdr.h b/device/dev_hdr.h
index 50e2977..7384766 100644
--- a/device/dev_hdr.h
+++ b/device/dev_hdr.h
@@ -106,22 +106,22 @@ typedef struct mach_device *mach_device_t;
/*
* To find and remove device entries
*/
-mach_device_t device_lookup(); /* by name */
+mach_device_t device_lookup(char *); /* by name */
-void mach_device_reference();
-void mach_device_deallocate();
+void mach_device_reference(mach_device_t);
+void mach_device_deallocate(mach_device_t);
/*
* To find and remove port-to-device mappings
*/
-device_t dev_port_lookup();
-void dev_port_enter();
-void dev_port_remove();
+device_t dev_port_lookup(ipc_port_t);
+void dev_port_enter(mach_device_t);
+void dev_port_remove(mach_device_t);
/*
* To call a routine on each device
*/
-boolean_t dev_map();
+boolean_t dev_map(boolean_t (*)(), mach_port_t);
/*
* To lock and unlock state and open-count
diff --git a/device/ds_routines.h b/device/ds_routines.h
index 111505d..3281c4c 100644
--- a/device/ds_routines.h
+++ b/device/ds_routines.h
@@ -35,18 +35,20 @@
#include <vm/vm_map.h>
#include <device/device_types.h>
+#include <device/io_req.h>
+#include <mach/machine/vm_types.h>
/*
* Map for device IO memory.
*/
vm_map_t device_io_map;
-kern_return_t device_read_alloc();
-kern_return_t device_write_get();
-boolean_t device_write_dealloc();
+kern_return_t device_read_alloc(io_req_t, vm_size_t);
+kern_return_t device_write_get(io_req_t, boolean_t *);
+boolean_t device_write_dealloc(io_req_t);
-boolean_t ds_open_done();
-boolean_t ds_read_done();
-boolean_t ds_write_done();
+boolean_t ds_open_done(io_req_t);
+boolean_t ds_read_done(io_req_t);
+boolean_t ds_write_done(io_req_t);
#endif /* DS_ROUTINES_H */
diff --git a/device/if_ether.h b/device/if_ether.h
index 5da40d6..2ac938e 100644
--- a/device/if_ether.h
+++ b/device/if_ether.h
@@ -51,7 +51,7 @@ struct ether_header {
#ifdef KERNEL
u_char etherbroadcastaddr[6];
-extern char * ether_sprintf();
+extern char * ether_sprintf(u_char *);
#endif /* KERNEL */
#endif /*_DEVICE_IF_ETHER_H_*/
diff --git a/device/io_req.h b/device/io_req.h
index 2bb4a99..4d249c6 100644
--- a/device/io_req.h
+++ b/device/io_req.h
@@ -121,7 +121,7 @@ typedef struct io_req * io_req_t;
/*
* Standard completion routine for io_requests.
*/
-void iodone(/* io_req_t */);
+void iodone(io_req_t);
/*
* Macros to allocate and free IORs - will convert to zones later.
diff --git a/device/net_io.h b/device/net_io.h
index 789614e..6842dec 100644
--- a/device/net_io.h
+++ b/device/net_io.h
@@ -42,6 +42,8 @@
#include <kern/lock.h>
#include <kern/kalloc.h>
+#include <device/if_hdr.h>
+#include <device/io_req.h>
#include <device/net_status.h>
/*
@@ -56,17 +58,18 @@
* functions. net_kmsg_get may return IKM_NULL.
*/
-extern ipc_kmsg_t net_kmsg_get();
-extern void net_kmsg_put();
+extern ipc_kmsg_t net_kmsg_get(void);
+extern void net_kmsg_put(ipc_kmsg_t);
/*
* Network utility routines.
*/
-extern void net_packet();
-extern void net_filter();
-extern io_return_t net_getstat();
-extern io_return_t net_write();
+extern void net_packet(struct ifnet *, ipc_kmsg_t, unsigned int, boolean_t);
+extern void net_filter(ipc_kmsg_t, ipc_kmsg_queue_t);
+extern io_return_t net_getstat(struct ifnet *, dev_flavor_t, dev_status_t,
+ natural_t *);
+extern io_return_t net_write(struct ifnet *, int (*)(), io_req_t);
/*
* Non-interrupt code may allocate and free net_kmsgs with these functions.
diff --git a/i386/i386/io_port.h b/i386/i386/io_port.h
index 62022b7..3344103 100644
--- a/i386/i386/io_port.h
+++ b/i386/i386/io_port.h
@@ -37,7 +37,7 @@ typedef unsigned short io_reg_t;
* Allocate and destroy io port sets for users to map into
* threads.
*/
-extern void io_port_create(/* device_t, io_reg_t * */);
-extern void io_port_destroy(/* device_t */);
+extern void io_port_create(mach_device_t, io_reg_t *);
+extern void io_port_destroy(mach_device_t);
#endif /* _I386_IO_PORT_H_ */
diff --git a/i386/i386/lock.h b/i386/i386/lock.h
index 6ed243b..09b3f2b 100644
--- a/i386/i386/lock.h
+++ b/i386/i386/lock.h
@@ -119,7 +119,7 @@
#endif /* __GNUC__ */
-extern void simple_lock_pause();
+extern void simple_lock_pause(void);
#endif /* NCPUS > 1 */
diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c
index 9678b6a..1e95f81 100644
--- a/i386/i386/mp_desc.c
+++ b/i386/i386/mp_desc.c
@@ -218,7 +218,7 @@ int simple_lock_pause_loop = 100;
unsigned int simple_lock_pause_count = 0; /* debugging */
void
-simple_lock_pause()
+simple_lock_pause(void)
{
static volatile int dummy;
int i;
diff --git a/i386/i386/mp_desc.h b/i386/i386/mp_desc.h
index d683cf6..e9a69d2 100644
--- a/i386/i386/mp_desc.h
+++ b/i386/i386/mp_desc.h
@@ -74,7 +74,7 @@ extern struct real_descriptor *mp_gdt[NCPUS];
/*
* Each CPU calls this routine to set up its descriptor tables.
*/
-extern struct mp_desc_table * mp_desc_init(/* int */);
+extern struct mp_desc_table * mp_desc_init(int);
#endif /* MULTIPROCESSOR */
diff --git a/i386/i386/proc_reg.h b/i386/i386/proc_reg.h
index f1b21d4..448b645 100644
--- a/i386/i386/proc_reg.h
+++ b/i386/i386/proc_reg.h
@@ -73,7 +73,7 @@
#ifdef __GNUC__
static inline unsigned
-get_eflags()
+get_eflags(void)
{
unsigned eflags;
asm("pushfd; popl %0" : "=r" (eflags));
diff --git a/i386/i386/user_ldt.h b/i386/i386/user_ldt.h
index 9267ac7..dd3ad4b 100644
--- a/i386/i386/user_ldt.h
+++ b/i386/i386/user_ldt.h
@@ -48,8 +48,8 @@ typedef struct user_ldt * user_ldt_t;
#define S_STACK 1 /* stack segment */
#define S_DATA 2 /* data segment */
-extern boolean_t selector_check(/* thread_t thread,
+extern boolean_t selector_check(thread_t thread,
int sel,
- int type */);
+ int type);
#endif /* _I386_USER_LDT_H_ */
diff --git a/i386/i386at/kd_queue.h b/i386/i386at/kd_queue.h
index 1190e60..c976acf 100644
--- a/i386/i386at/kd_queue.h
+++ b/i386/i386at/kd_queue.h
@@ -74,6 +74,8 @@ typedef struct {
int firstfree, firstout;
} kd_event_queue;
-extern void kdq_put(), kdq_reset();
-extern boolean_t kdq_empty(), kdq_full();
-extern kd_event *kdq_get();
+extern void kdq_put(kd_event_queue *, kd_event *);
+extern void kdq_reset(kd_event_queue *);
+extern boolean_t kdq_empty(kd_event_queue *);
+extern boolean_t kdq_full(kd_event_queue *);
+extern kd_event *kdq_get(kd_event_queue *);
diff --git a/i386/i386at/kdsoft.h b/i386/i386at/kdsoft.h
index 2be21d0..96e2df8 100644
--- a/i386/i386at/kdsoft.h
+++ b/i386/i386at/kdsoft.h
@@ -58,6 +58,24 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
+ * Globals used for both character-based controllers and bitmap-based
+ * controllers.
+ */
+typedef short csrpos_t; /* cursor position, ONE_SPACE bytes per char */
+
+extern u_char *vid_start; /* VM start of video RAM or frame buffer */
+extern csrpos_t kd_curpos; /* should be set only by kd_setpos */
+extern short kd_lines; /* num lines in tty display */
+extern short kd_cols;
+extern char kd_attr; /* current character attribute */
+
+
+/*
+ * Globals used only for bitmap-based controllers.
+ * XXX - probably needs reworking for color.
+ */
+
+/*
* This driver handles two types of graphics cards. The first type
* (e.g., EGA, CGA), treats the screen as a page of characters and
* has a hardware cursor. The second type (e.g., the Blit) treats the
@@ -118,7 +136,11 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* system to reboot.
*/
-extern void bmpput(), bmpmvup(), bmpmvdown(), bmpclear(), bmpsetcursor();
+extern void bmpput(csrpos_t, char, char);
+extern void bmpmvup(csrpos_t, csrpos_t, int);
+extern void bmpmvdown(csrpos_t, csrpos_t, int);
+extern void bmpclear(csrpos_t, int, char);
+extern void bmpsetcursor(csrpos_t);
extern void (*kd_dput)(); /* put attributed char */
extern void (*kd_dmvup)(); /* block move up */
@@ -130,24 +152,6 @@ extern void (*kd_dreset)(); /* prepare for reboot */
/*
- * Globals used for both character-based controllers and bitmap-based
- * controllers.
- */
-typedef short csrpos_t; /* cursor position, ONE_SPACE bytes per char */
-
-extern u_char *vid_start; /* VM start of video RAM or frame buffer */
-extern csrpos_t kd_curpos; /* should be set only by kd_setpos */
-extern short kd_lines; /* num lines in tty display */
-extern short kd_cols;
-extern char kd_attr; /* current character attribute */
-
-
-/*
- * Globals used only for bitmap-based controllers.
- * XXX - probably needs reworking for color.
- */
-
-/*
* The following font layout is assumed:
*
* The top scan line of all the characters comes first. Then the
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index de65ac8..1043daa 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -2312,7 +2312,7 @@ void process_pmap_updates(my_pmap)
/*
* Interrupt routine for TBIA requested from other processor.
*/
-void pmap_update_interrupt()
+void pmap_update_interrupt(void)
{
register int my_cpu;
register pmap_t my_pmap;
diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h
index a6e4ab9..0255f5a 100644
--- a/i386/intel/pmap.h
+++ b/i386/intel/pmap.h
@@ -162,8 +162,8 @@ boolean_t cpu_update_needed[NCPUS];
* External declarations for PMAP_ACTIVATE.
*/
-void process_pmap_updates();
-void pmap_update_interrupt();
+void process_pmap_updates(pmap_t);
+void pmap_update_interrupt(void);
extern pmap_t kernel_pmap;
#endif /* NCPUS > 1 */
diff --git a/include/mach/mach_traps.h b/include/mach/mach_traps.h
index 42bfddb..d18385d 100644
--- a/include/mach/mach_traps.h
+++ b/include/mach/mach_traps.h
@@ -40,7 +40,7 @@ mach_port_t mach_reply_port
()
{ return MACH_PORT_NULL; }
#else /* LINTLIBRARY */
- ();
+ (void);
#endif /* LINTLIBRARY */
mach_port_t mach_thread_self
@@ -48,7 +48,7 @@ mach_port_t mach_thread_self
()
{ return MACH_PORT_NULL; }
#else /* LINTLIBRARY */
- ();
+ (void);
#endif /* LINTLIBRARY */
#ifdef __386BSD__
@@ -59,7 +59,7 @@ mach_port_t mach_task_self
()
{ return MACH_PORT_NULL; }
#else /* LINTLIBRARY */
- ();
+ (self);
#endif /* LINTLIBRARY */
mach_port_t mach_host_self
@@ -67,7 +67,7 @@ mach_port_t mach_host_self
()
{ return MACH_PORT_NULL; }
#else /* LINTLIBRARY */
- ();
+ (void);
#endif /* LINTLIBRARY */
#endif /* _MACH_MACH_TRAPS_H_ */
diff --git a/ipc/ipc_entry.h b/ipc/ipc_entry.h
index 6e316bd..a577cf0 100644
--- a/ipc/ipc_entry.h
+++ b/ipc/ipc_entry.h
@@ -38,11 +38,13 @@
#ifndef _IPC_IPC_ENTRY_H_
#define _IPC_IPC_ENTRY_H_
+#include <mach/mach_types.h>
#include <mach/port.h>
#include <mach/kern_return.h>
#include <kern/zalloc.h>
#include <ipc/port.h>
#include <ipc/ipc_table.h>
+#include <ipc/ipc_types.h>
/*
* Spaces hold capabilities for ipc_object_t's (ports and port sets).
@@ -134,25 +136,21 @@ extern zone_t ipc_tree_entry_zone;
extern ipc_entry_t
-ipc_entry_lookup(/* ipc_space_t space, mach_port_t name */);
+ipc_entry_lookup(ipc_space_t space, mach_port_t name);
extern kern_return_t
-ipc_entry_get(/* ipc_space_t space,
- mach_port_t *namep, ipc_entry_t *entryp */);
+ipc_entry_get(ipc_space_t space, mach_port_t *namep, ipc_entry_t *entryp);
extern kern_return_t
-ipc_entry_alloc(/* ipc_space_t space,
- mach_port_t *namep, ipc_entry_t *entryp */);
+ipc_entry_alloc(ipc_space_t space, mach_port_t *namep, ipc_entry_t *entryp);
extern kern_return_t
-ipc_entry_alloc_name(/* ipc_space_t space, mach_port_t name,
- ipc_entry_t *entryp */);
+ipc_entry_alloc_name(ipc_space_t space, mach_port_t name, ipc_entry_t *entryp);
extern void
-ipc_entry_dealloc(/* ipc_space_t space, mach_port_t name,
- ipc_entry_t entry */);
+ipc_entry_dealloc(ipc_space_t space, mach_port_t name, ipc_entry_t entry);
extern kern_return_t
-ipc_entry_grow_table(/* ipc_space_t space */);
+ipc_entry_grow_table(ipc_space_t space);
#endif /* _IPC_IPC_ENTRY_H_ */
diff --git a/ipc/ipc_hash.c b/ipc/ipc_hash.c
index ce720c7..c241289 100644
--- a/ipc/ipc_hash.c
+++ b/ipc/ipc_hash.c
@@ -136,8 +136,6 @@ ipc_hash_delete(
* Within each bucket, move-to-front is used.
*/
-typedef natural_t ipc_hash_index_t;
-
ipc_hash_index_t ipc_hash_global_size;
ipc_hash_index_t ipc_hash_global_mask;
diff --git a/ipc/ipc_hash.h b/ipc/ipc_hash.h
index b5b1ba6..58c56ca 100644
--- a/ipc/ipc_hash.h
+++ b/ipc/ipc_hash.h
@@ -37,27 +37,29 @@
#include <mach/boolean.h>
#include <mach/kern_return.h>
+typedef natural_t ipc_hash_index_t;
+
extern void
-ipc_hash_init();
+ipc_hash_init(void);
#if MACH_IPC_DEBUG
-extern unsigned int
-ipc_hash_info(/* hash_info_bucket_t *, unsigned int */);
+extern ipc_hash_index_t
+ipc_hash_info(hash_info_bucket_t *, mach_msg_type_number_t);
#endif /* MACH_IPC_DEBUG */
extern boolean_t
-ipc_hash_lookup(/* ipc_space_t space, ipc_object_t obj,
- mach_port_t *namep, ipc_entry_t *entryp */);
+ipc_hash_lookup(ipc_space_t space, ipc_object_t obj,
+ mach_port_t *namep, ipc_entry_t *entryp);
extern void
-ipc_hash_insert(/* ipc_space_t space, ipc_object_t obj,
- mach_port_t name, ipc_entry_t entry */);
+ipc_hash_insert(ipc_space_t space, ipc_object_t obj,
+ mach_port_t name, ipc_entry_t entry);
extern void
-ipc_hash_delete(/* ipc_space_t space, ipc_object_t obj,
- mach_port_t name, ipc_entry_t entry */);
+ipc_hash_delete(ipc_space_t space, ipc_object_t obj,
+ mach_port_t name, ipc_entry_t entry);
/*
* For use by functions that know what they're doing:
@@ -66,27 +68,27 @@ ipc_hash_delete(/* ipc_space_t space, ipc_object_t obj,
*/
extern boolean_t
-ipc_hash_global_lookup(/* ipc_space_t space, ipc_object_t obj,
- mach_port_t *namep, ipc_tree_entry_t *entryp */);
+ipc_hash_global_lookup(ipc_space_t space, ipc_object_t obj,
+ mach_port_t *namep, ipc_tree_entry_t *entryp);
extern void
-ipc_hash_global_insert(/* ipc_space_t space, ipc_object_t obj,
- mach_port_t name, ipc_tree_entry_t entry */);
+ipc_hash_global_insert(ipc_space_t space, ipc_object_t obj,
+ mach_port_t name, ipc_tree_entry_t entry);
extern void
-ipc_hash_global_delete(/* ipc_space_t space, ipc_object_t obj,
- mach_port_t name, ipc_tree_entry_t entry */);
+ipc_hash_global_delete(ipc_space_t space, ipc_object_t obj,
+ mach_port_t name, ipc_tree_entry_t entry);
extern boolean_t
-ipc_hash_local_lookup(/* ipc_space_t space, ipc_object_t obj,
- mach_port_t *namep, ipc_entry_t *entryp */);
+ipc_hash_local_lookup(ipc_space_t space, ipc_object_t obj,
+ mach_port_t *namep, ipc_entry_t *entryp);
extern void
-ipc_hash_local_insert(/* ipc_space_t space, ipc_object_t obj,
- mach_port_index_t index, ipc_entry_t entry */);
+ipc_hash_local_insert(ipc_space_t space, ipc_object_t obj,
+ mach_port_index_t index, ipc_entry_t entry);
extern void
-ipc_hash_local_delete(/* ipc_space_t space, ipc_object_t obj,
- mach_port_index_t index, ipc_entry_t entry */);
+ipc_hash_local_delete(ipc_space_t space, ipc_object_t obj,
+ mach_port_index_t index, ipc_entry_t entry);
#endif /* _IPC_IPC_HASH_H_ */
diff --git a/ipc/ipc_kmsg.h b/ipc/ipc_kmsg.h
index 7617692..8867310 100644
--- a/ipc/ipc_kmsg.h
+++ b/ipc/ipc_kmsg.h
@@ -41,6 +41,9 @@
#include <kern/macro_help.h>
#include <kern/kalloc.h>
#include <ipc/ipc_marequest.h>
+#include <ipc/ipc_object.h>
+#include <ipc/ipc_types.h>
+#include <vm/vm_map.h>
/*
* This structure is only the header for a kmsg buffer;
@@ -217,53 +220,52 @@ MACRO_BEGIN \
MACRO_END
extern void
-ipc_kmsg_destroy(/* ipc_kmsg_t */);
+ipc_kmsg_destroy(ipc_kmsg_t);
extern void
-ipc_kmsg_clean(/* ipc_kmsg_t */);
+ipc_kmsg_clean(ipc_kmsg_t);
extern void
-ipc_kmsg_free(/* ipc_kmsg_t */);
+ipc_kmsg_free(ipc_kmsg_t);
extern mach_msg_return_t
-ipc_kmsg_get(/* mach_msg_header_t *, mach_msg_size_t, ipc_kmsg_t * */);
+ipc_kmsg_get(mach_msg_header_t *, mach_msg_size_t, ipc_kmsg_t *);
extern mach_msg_return_t
-ipc_kmsg_get_from_kernel(/* mach_msg_header_t *, mach_msg_size_t,
- ipc_kmsg_t * */);
+ipc_kmsg_get_from_kernel(mach_msg_header_t *, mach_msg_size_t, ipc_kmsg_t *);
extern mach_msg_return_t
-ipc_kmsg_put(/* mach_msg_header_t *, ipc_kmsg_t, mach_msg_size_t */);
+ipc_kmsg_put(mach_msg_header_t *, ipc_kmsg_t, mach_msg_size_t);
extern void
-ipc_kmsg_put_to_kernel(/* mach_msg_header_t *, ipc_kmsg_t, mach_msg_size_t */);
+ipc_kmsg_put_to_kernel(mach_msg_header_t *, ipc_kmsg_t, mach_msg_size_t);
extern mach_msg_return_t
-ipc_kmsg_copyin_header(/* mach_msg_header_t *, ipc_space_t, mach_port_t */);
+ipc_kmsg_copyin_header(mach_msg_header_t *, ipc_space_t, mach_port_t);
extern mach_msg_return_t
-ipc_kmsg_copyin(/* ipc_kmsg_t, ipc_space_t, vm_map_t, mach_port_t */);
+ipc_kmsg_copyin(ipc_kmsg_t, ipc_space_t, vm_map_t, mach_port_t);
extern void
-ipc_kmsg_copyin_from_kernel(/* ipc_kmsg_t */);
+ipc_kmsg_copyin_from_kernel(ipc_kmsg_t);
extern mach_msg_return_t
-ipc_kmsg_copyout_header(/* mach_msg_header_t *, ipc_space_t, mach_port_t */);
+ipc_kmsg_copyout_header(mach_msg_header_t *, ipc_space_t, mach_port_t);
extern mach_msg_return_t
-ipc_kmsg_copyout_object(/* ipc_space_t, ipc_object_t,
- mach_msg_type_name_t, mach_port_t * */);
+ipc_kmsg_copyout_object(ipc_space_t, ipc_object_t,
+ mach_msg_type_name_t, mach_port_t *);
extern mach_msg_return_t
-ipc_kmsg_copyout_body(/* vm_offset_t, vm_offset_t, ipc_space_t, vm_map_t */);
+ipc_kmsg_copyout_body(vm_offset_t, vm_offset_t, ipc_space_t, vm_map_t);
extern mach_msg_return_t
-ipc_kmsg_copyout(/* ipc_kmsg_t, ipc_space_t, vm_map_t, mach_port_t */);
+ipc_kmsg_copyout(ipc_kmsg_t, ipc_space_t, vm_map_t, mach_port_t);
extern mach_msg_return_t
-ipc_kmsg_copyout_pseudo(/* ipc_kmsg_t, ipc_space_t, vm_map_t */);
+ipc_kmsg_copyout_pseudo(ipc_kmsg_t, ipc_space_t, vm_map_t);
extern void
-ipc_kmsg_copyout_dest(/* ipc_kmsg_t, ipc_space_t */);
+ipc_kmsg_copyout_dest(ipc_kmsg_t, ipc_space_t);
#endif /* _IPC_IPC_KMSG_H_ */
diff --git a/ipc/ipc_marequest.c b/ipc/ipc_marequest.c
index 16c6a5f..540382a 100644
--- a/ipc/ipc_marequest.c
+++ b/ipc/ipc_marequest.c
@@ -96,7 +96,7 @@ ipc_marequest_bucket_t ipc_marequest_table;
*/
void
-ipc_marequest_init()
+ipc_marequest_init(void)
{
ipc_marequest_index_t i;
diff --git a/ipc/ipc_marequest.h b/ipc/ipc_marequest.h
index 6f4e6c8..eb3746d 100644
--- a/ipc/ipc_marequest.h
+++ b/ipc/ipc_marequest.h
@@ -36,6 +36,8 @@
#include <mach/kern_return.h>
#include <mach/port.h>
+#include <mach_debug/hash_info.h>
+#include <ipc/ipc_types.h>
/*
* A msg-accepted request is made when MACH_SEND_NOTIFY is used
@@ -70,27 +72,27 @@ typedef struct ipc_marequest {
extern void
-ipc_marequest_init();
+ipc_marequest_init(void);
#if MACH_IPC_DEBUG
extern unsigned int
-ipc_marequest_info(/* unsigned int *, hash_info_bucket_t *, unsigned int */);
+ipc_marequest_info(unsigned int *, hash_info_bucket_t *, unsigned int);
#endif /* MACH_IPC_DEBUG */
extern mach_msg_return_t
-ipc_marequest_create(/* ipc_space_t space, mach_port_t name,
- ipc_port_t soright, ipc_marequest_t *marequestp */);
+ipc_marequest_create(ipc_space_t space, ipc_port_t port,
+ mach_port_t notify, ipc_marequest_t *marequestp);
extern void
-ipc_marequest_cancel(/* ipc_space_t space, mach_port_t name */);
+ipc_marequest_cancel(ipc_space_t space, mach_port_t name);
extern void
-ipc_marequest_rename(/* ipc_space_t space,
- mach_port_t old, mach_port_t new */);
+ipc_marequest_rename(ipc_space_t space,
+ mach_port_t old, mach_port_t new);
extern void
-ipc_marequest_destroy(/* ipc_marequest_t marequest */);
+ipc_marequest_destroy(ipc_marequest_t marequest);
#endif /* _IPC_IPC_MAREQUEST_H_ */
diff --git a/ipc/ipc_mqueue.h b/ipc/ipc_mqueue.h
index 5c284a3..6421aef 100644
--- a/ipc/ipc_mqueue.h
+++ b/ipc/ipc_mqueue.h
@@ -55,24 +55,24 @@ typedef struct ipc_mqueue {
#define imq_unlock(mq) simple_unlock(&(mq)->imq_lock_data)
extern void
-ipc_mqueue_init(/* ipc_mqueue_t */);
+ipc_mqueue_init(ipc_mqueue_t);
extern void
-ipc_mqueue_move(/* ipc_mqueue_t, ipc_mqueue_t, ipc_port_t */);
+ipc_mqueue_move(ipc_mqueue_t, ipc_mqueue_t, ipc_port_t);
extern void
-ipc_mqueue_changed(/* ipc_mqueue_t, mach_msg_return_t */);
+ipc_mqueue_changed(ipc_mqueue_t, mach_msg_return_t);
extern mach_msg_return_t
-ipc_mqueue_send(/* ipc_kmsg_t, mach_msg_option_t, mach_msg_timeout_t */);
+ipc_mqueue_send(ipc_kmsg_t, mach_msg_option_t, mach_msg_timeout_t);
#define IMQ_NULL_CONTINUE ((void (*)()) 0)
extern mach_msg_return_t
-ipc_mqueue_receive(/* ipc_mqueue_t, mach_msg_option_t,
- mach_msg_size_t, mach_msg_timeout_t,
- boolean_t, void (*)(),
- ipc_kmsg_t *, mach_port_seqno_t * */);
+ipc_mqueue_receive(ipc_mqueue_t, mach_msg_option_t,
+ mach_msg_size_t, mach_msg_timeout_t,
+ boolean_t, void (*)(),
+ ipc_kmsg_t *, mach_port_seqno_t *);
/*
* extern void
diff --git a/ipc/ipc_notify.h b/ipc/ipc_notify.h
index 60872a9..789bd23 100644
--- a/ipc/ipc_notify.h
+++ b/ipc/ipc_notify.h
@@ -35,24 +35,24 @@
#define _IPC_IPC_NOTIFY_H_
extern void
-ipc_notify_init();
+ipc_notify_init(void);
extern void
-ipc_notify_port_deleted(/* ipc_port_t, mach_port_t */);
+ipc_notify_port_deleted(ipc_port_t, mach_port_t);
extern void
-ipc_notify_msg_accepted(/* ipc_port_t, mach_port_t */);
+ipc_notify_msg_accepted(ipc_port_t, mach_port_t);
extern void
-ipc_notify_port_destroyed(/* ipc_port_t, ipc_port_t */);
+ipc_notify_port_destroyed(ipc_port_t, ipc_port_t);
extern void
-ipc_notify_no_senders(/* ipc_port_t, mach_port_mscount_t */);
+ipc_notify_no_senders(ipc_port_t, mach_port_mscount_t);
extern void
-ipc_notify_send_once(/* ipc_port_t */);
+ipc_notify_send_once(ipc_port_t);
extern void
-ipc_notify_dead_name(/* ipc_port_t, mach_port_t */);
+ipc_notify_dead_name(ipc_port_t, mach_port_t);
#endif /* _IPC_IPC_NOTIFY_H_ */
diff --git a/ipc/ipc_object.h b/ipc/ipc_object.h
index 7c6eb4e..2bbf8bd 100644
--- a/ipc/ipc_object.h
+++ b/ipc/ipc_object.h
@@ -36,6 +36,7 @@
#include <mach/kern_return.h>
#include <mach/message.h>
+#include <ipc/ipc_types.h>
#include <kern/lock.h>
#include <kern/macro_help.h>
#include <kern/zalloc.h>
@@ -107,60 +108,60 @@ MACRO_BEGIN \
MACRO_END
extern void
-ipc_object_reference(/* ipc_object_t */);
+ipc_object_reference(ipc_object_t);
extern void
-ipc_object_release(/* ipc_object_t */);
+ipc_object_release(ipc_object_t);
extern kern_return_t
-ipc_object_translate(/* ipc_space_t, mach_port_t,
- mach_port_right_t, ipc_object_t * */);
+ipc_object_translate(ipc_space_t, mach_port_t,
+ mach_port_right_t, ipc_object_t *);
extern kern_return_t
-ipc_object_alloc_dead(/* ipc_space_t, mach_port_t * */);
+ipc_object_alloc_dead(ipc_space_t, mach_port_t *);
extern kern_return_t
-ipc_object_alloc_dead_name(/* ipc_space_t, mach_port_t */);
+ipc_object_alloc_dead_name(ipc_space_t, mach_port_t);
extern kern_return_t
-ipc_object_alloc(/* ipc_space_t, ipc_object_type_t,
- mach_port_type_t, mach_port_urefs_t,
- mach_port_t *, ipc_object_t * */);
+ipc_object_alloc(ipc_space_t, ipc_object_type_t,
+ mach_port_type_t, mach_port_urefs_t,
+ mach_port_t *, ipc_object_t *);
extern kern_return_t
-ipc_object_alloc_name(/* ipc_space_t, ipc_object_type_t,
- mach_port_type_t, mach_port_urefs_t,
- mach_port_t, ipc_object_t * */);
+ipc_object_alloc_name(ipc_space_t, ipc_object_type_t,
+ mach_port_type_t, mach_port_urefs_t,
+ mach_port_t, ipc_object_t *);
extern mach_msg_type_name_t
-ipc_object_copyin_type(/* mach_msg_type_name_t */);
+ipc_object_copyin_type(mach_msg_type_name_t);
extern kern_return_t
-ipc_object_copyin(/* ipc_space_t, mach_port_t,
- mach_msg_type_name_t, ipc_object_t * */);
+ipc_object_copyin(ipc_space_t, mach_port_t,
+ mach_msg_type_name_t, ipc_object_t *);
extern void
-ipc_object_copyin_from_kernel(/* ipc_object_t, mach_msg_type_name_t */);
+ipc_object_copyin_from_kernel(ipc_object_t, mach_msg_type_name_t);
extern void
-ipc_object_destroy(/* ipc_object_t, mach_msg_type_name_t */);
+ipc_object_destroy(ipc_object_t, mach_msg_type_name_t);
extern kern_return_t
-ipc_object_copyout(/* ipc_space_t, ipc_object_t,
- mach_msg_type_name_t, boolean_t, mach_port_t * */);
+ipc_object_copyout(ipc_space_t, ipc_object_t,
+ mach_msg_type_name_t, boolean_t, mach_port_t *);
extern kern_return_t
-ipc_object_copyout_name(/* ipc_space_t, ipc_object_t,
- mach_msg_type_name_t, boolean_t, mach_port_t */);
+ipc_object_copyout_name(ipc_space_t, ipc_object_t,
+ mach_msg_type_name_t, boolean_t, mach_port_t);
extern void
-ipc_object_copyout_dest(/* ipc_space_t, ipc_object_t,
- mach_msg_type_name_t, mach_port_t * */);
+ipc_object_copyout_dest(ipc_space_t, ipc_object_t,
+ mach_msg_type_name_t, mach_port_t *);
extern kern_return_t
-ipc_object_rename(/* ipc_space_t, mach_port_t, mach_port_t */);
+ipc_object_rename(ipc_space_t, mach_port_t, mach_port_t);
extern void
-ipc_object_print(/* ipc_object_t */);
+ipc_object_print(ipc_object_t);
#endif /* _IPC_IPC_OBJECT_H_ */
diff --git a/ipc/ipc_port.h b/ipc/ipc_port.h
index 4427861..70ec494 100644
--- a/ipc/ipc_port.h
+++ b/ipc/ipc_port.h
@@ -46,7 +46,6 @@
#include <kern/macro_help.h>
#include <kern/ipc_kobject.h>
#include <ipc/ipc_mqueue.h>
-#include <ipc/ipc_space.h>
#include <ipc/ipc_table.h>
#include <ipc/ipc_thread.h>
#include "ipc_target.h"
@@ -185,7 +184,7 @@ extern ipc_port_timestamp_t ipc_port_timestamp_data;
simple_unlock(&ipc_port_timestamp_lock_data)
extern ipc_port_timestamp_t
-ipc_port_timestamp();
+ipc_port_timestamp(void);
/*
* Compares two timestamps, and returns TRUE if one
@@ -207,14 +206,14 @@ ipc_port_timestamp();
(ipc_object_t *) (portp))
extern kern_return_t
-ipc_port_dnrequest(/* ipc_port_t, mach_port_t, ipc_port_t,
- ipc_port_request_index_t * */);
+ipc_port_dnrequest(ipc_port_t, mach_port_t, ipc_port_t,
+ ipc_port_request_index_t *);
extern kern_return_t
-ipc_port_dngrow(/* ipc_port_t */);
+ipc_port_dngrow(ipc_port_t);
extern ipc_port_t
-ipc_port_dncancel(/* ipc_port_t, mach_port_t, ipc_port_request_index_t */);
+ipc_port_dncancel(ipc_port_t, mach_port_t, ipc_port_request_index_t);
#define ipc_port_dnrename(port, index, oname, nname) \
MACRO_BEGIN \
@@ -257,58 +256,58 @@ MACRO_BEGIN \
MACRO_END
extern struct ipc_mqueue *
-ipc_port_lock_mqueue(/* ipc_port_t */);
+ipc_port_lock_mqueue(ipc_port_t);
extern void
-ipc_port_set_seqno(/* ipc_port_t, mach_port_seqno_t */);
+ipc_port_set_seqno(ipc_port_t, mach_port_seqno_t);
extern void
-ipc_port_clear_receiver(/* ipc_port_t */);
+ipc_port_clear_receiver(ipc_port_t);
extern void
-ipc_port_init(/* ipc_port_t, ipc_space_t, mach_port_t */);
+ipc_port_init(ipc_port_t, ipc_space_t, mach_port_t);
extern kern_return_t
-ipc_port_alloc(/* ipc_space_t, mach_port_t *, ipc_port_t * */);
+ipc_port_alloc(ipc_space_t, mach_port_t *, ipc_port_t *);
extern kern_return_t
-ipc_port_alloc_name(/* ipc_space_t, mach_port_t, ipc_port_t * */);
+ipc_port_alloc_name(ipc_space_t, mach_port_t, ipc_port_t *);
extern void
-ipc_port_destroy(/* ipc_port_t */);
+ipc_port_destroy(ipc_port_t);
extern boolean_t
-ipc_port_check_circularity(/* ipc_port_t, ipc_port_t */);
+ipc_port_check_circularity(ipc_port_t, ipc_port_t);
extern ipc_port_t
-ipc_port_lookup_notify(/* ipc_space_t, mach_port_t */);
+ipc_port_lookup_notify(ipc_space_t, mach_port_t);
extern ipc_port_t
-ipc_port_make_send(/* ipc_port_t */);
+ipc_port_make_send(ipc_port_t);
extern ipc_port_t
-ipc_port_copy_send(/* ipc_port_t */);
+ipc_port_copy_send(ipc_port_t);
extern mach_port_t
-ipc_port_copyout_send(/* ipc_port_t, ipc_space_t */);
+ipc_port_copyout_send(ipc_port_t, ipc_space_t);
extern void
-ipc_port_release_send(/* ipc_port_t */);
+ipc_port_release_send(ipc_port_t);
extern ipc_port_t
-ipc_port_make_sonce(/* ipc_port_t */);
+ipc_port_make_sonce(ipc_port_t);
extern void
-ipc_port_release_sonce(/* ipc_port_t */);
+ipc_port_release_sonce(ipc_port_t);
extern void
-ipc_port_release_receive(/* ipc_port_t */);
+ipc_port_release_receive(ipc_port_t);
extern ipc_port_t
-ipc_port_alloc_special(/* ipc_space_t */);
+ipc_port_alloc_special(ipc_space_t);
extern void
-ipc_port_dealloc_special(/* ipc_port_t */);
+ipc_port_dealloc_special(ipc_port_t, ipc_space_t);
#define ipc_port_alloc_kernel() \
ipc_port_alloc_special(ipc_space_kernel)
@@ -327,6 +326,6 @@ ipc_port_dealloc_special(/* ipc_port_t */);
ipc_object_release(&(port)->ip_object)
extern void
-ipc_port_print(/* ipc_port_t */);
+ipc_port_print(ipc_port_t);
#endif /* _IPC_IPC_PORT_H_ */
diff --git a/ipc/ipc_pset.h b/ipc/ipc_pset.h
index e6cdd5b..ac984f9 100644
--- a/ipc/ipc_pset.h
+++ b/ipc/ipc_pset.h
@@ -66,22 +66,22 @@ typedef struct ipc_pset {
#define ips_release(pset) io_release(&(pset)->ips_object)
extern kern_return_t
-ipc_pset_alloc(/* ipc_space_t, mach_port_t *, ipc_pset_t * */);
+ipc_pset_alloc(ipc_space_t, mach_port_t *, ipc_pset_t *);
extern kern_return_t
-ipc_pset_alloc_name(/* ipc_space_t, mach_port_t, ipc_pset_t * */);
+ipc_pset_alloc_name(ipc_space_t, mach_port_t, ipc_pset_t *);
extern void
-ipc_pset_add(/* ipc_pset_t, ipc_port_t */);
+ipc_pset_add(ipc_pset_t, ipc_port_t);
extern void
-ipc_pset_remove(/* ipc_pset_t, ipc_port_t */);
+ipc_pset_remove(ipc_pset_t, ipc_port_t);
extern kern_return_t
-ipc_pset_move(/* ipc_space_t, mach_port_t, mach_port_t */);
+ipc_pset_move(ipc_space_t, ipc_port_t, ipc_pset_t);
extern void
-ipc_pset_destroy(/* ipc_pset_t */);
+ipc_pset_destroy(ipc_pset_t);
#define ipc_pset_reference(pset) \
ipc_object_reference(&(pset)->ips_object)
@@ -90,6 +90,6 @@ ipc_pset_destroy(/* ipc_pset_t */);
ipc_object_release(&(pset)->ips_object)
extern void
-ipc_pset_print(/* ipc_pset_t */);
+ipc_pset_print(ipc_pset_t);
#endif /* _IPC_IPC_PSET_H_ */
diff --git a/ipc/ipc_right.h b/ipc/ipc_right.h
index fe0a088..03642f8 100644
--- a/ipc/ipc_right.h
+++ b/ipc/ipc_right.h
@@ -38,74 +38,75 @@
#include <mach/boolean.h>
#include <mach/kern_return.h>
+#include <ipc/ipc_entry.h>
#include <ipc/ipc_port.h>
#define ipc_right_lookup_read ipc_right_lookup_write
extern kern_return_t
-ipc_right_lookup_write(/* ipc_space_t, mach_port_t, ipc_entry_t * */);
+ipc_right_lookup_write(ipc_space_t, mach_port_t, ipc_entry_t *);
extern boolean_t
-ipc_right_reverse(/* ipc_space_t, ipc_object_t,
- mach_port_t *, ipc_entry_t * */);
+ipc_right_reverse(ipc_space_t, ipc_object_t,
+ mach_port_t *, ipc_entry_t *);
extern kern_return_t
-ipc_right_dnrequest(/* ipc_space_t, mach_port_t, boolean_t,
- ipc_port_t, ipc_port_t * */);
+ipc_right_dnrequest(ipc_space_t, mach_port_t, boolean_t,
+ ipc_port_t, ipc_port_t *);
extern ipc_port_t
-ipc_right_dncancel(/* ipc_space_t, ipc_port_t, mach_port_t, ipc_entry_t */);
+ipc_right_dncancel(ipc_space_t, ipc_port_t, mach_port_t, ipc_entry_t);
#define ipc_right_dncancel_macro(space, port, name, entry) \
(((entry)->ie_request == 0) ? IP_NULL : \
ipc_right_dncancel((space), (port), (name), (entry)))
extern boolean_t
-ipc_right_inuse(/* ipc_space_t, mach_port_t, ipc_entry_t */);
+ipc_right_inuse(ipc_space_t, mach_port_t, ipc_entry_t);
extern boolean_t
-ipc_right_check(/* ipc_space_t, mach_port_t, ipc_entry_t, ipc_port_t */);
+ipc_right_check(ipc_space_t, ipc_port_t, mach_port_t, ipc_entry_t);
extern void
-ipc_right_clean(/* ipc_space_t, mach_port_t, ipc_entry_t */);
+ipc_right_clean(ipc_space_t, mach_port_t, ipc_entry_t);
extern kern_return_t
-ipc_right_destroy(/* ipc_space_t, mach_port_t, ipc_entry_t */);
+ipc_right_destroy(ipc_space_t, mach_port_t, ipc_entry_t);
extern kern_return_t
-ipc_right_dealloc(/* ipc_space_t, mach_port_t, ipc_entry_t */);
+ipc_right_dealloc(ipc_space_t, mach_port_t, ipc_entry_t);
extern kern_return_t
-ipc_right_delta(/* ipc_space_t, mach_port_t, ipc_entry_t,
- mach_port_right_t, mach_port_delta_t */);
+ipc_right_delta(ipc_space_t, mach_port_t, ipc_entry_t,
+ mach_port_right_t, mach_port_delta_t);
extern kern_return_t
-ipc_right_info(/* ipc_space_t, mach_port_t, ipc_entry_t,
- mach_port_type_t *, mach_port_urefs_t * */);
+ipc_right_info(ipc_space_t, mach_port_t, ipc_entry_t,
+ mach_port_type_t *, mach_port_urefs_t *);
extern boolean_t
-ipc_right_copyin_check(/* ipc_space_t, mach_port_t, ipc_entry_t,
- mach_msg_type_name_t */);
+ipc_right_copyin_check(ipc_space_t, mach_port_t, ipc_entry_t,
+ mach_msg_type_name_t);
extern kern_return_t
-ipc_right_copyin(/* ipc_space_t, mach_port_t, ipc_entry_t,
- mach_msg_type_name_t, boolean_t,
- ipc_object_t *, ipc_port_t * */);
+ipc_right_copyin(ipc_space_t, mach_port_t, ipc_entry_t,
+ mach_msg_type_name_t, boolean_t,
+ ipc_object_t *, ipc_port_t *);
extern void
-ipc_right_copyin_undo(/* ipc_space_t, mach_port_t, ipc_entry_t,
- mach_msg_type_name_t, ipc_object_t, ipc_port_t */);
+ipc_right_copyin_undo(ipc_space_t, mach_port_t, ipc_entry_t,
+ mach_msg_type_name_t, ipc_object_t, ipc_port_t);
extern kern_return_t
-ipc_right_copyin_two(/* ipc_space_t, mach_port_t, ipc_entry_t,
- ipc_object_t *, ipc_port_t * */);
+ipc_right_copyin_two(ipc_space_t, mach_port_t, ipc_entry_t,
+ ipc_object_t *, ipc_port_t *);
extern kern_return_t
-ipc_right_copyout(/* ipc_space_t, mach_port_t, ipc_entry_t,
- mach_msg_type_name_t, boolean_t, ipc_object_t */);
+ipc_right_copyout(ipc_space_t, mach_port_t, ipc_entry_t,
+ mach_msg_type_name_t, boolean_t, ipc_object_t);
extern kern_return_t
-ipc_right_rename(/* ipc_space_t, mach_port_t, ipc_entry_t,
- mach_port_t, ipc_entry_t */);
+ipc_right_rename(ipc_space_t, mach_port_t, ipc_entry_t,
+ mach_port_t, ipc_entry_t);
#endif /* _IPC_IPC_RIGHT_H_ */
diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h
index 50f5d5e..d030bf7 100644
--- a/ipc/ipc_space.h
+++ b/ipc/ipc_space.h
@@ -41,9 +41,11 @@
#include <mach/boolean.h>
#include <mach/kern_return.h>
+#include <mach/mach_types.h>
#include <kern/macro_help.h>
#include <kern/lock.h>
#include <ipc/ipc_splay.h>
+#include <ipc/ipc_types.h>
/*
* Every task has a space of IPC capabilities.
@@ -128,7 +130,7 @@ extern void ipc_space_release(struct ipc_space *space);
#define is_reference(is) ipc_space_reference(is)
#define is_release(is) ipc_space_release(is)
-kern_return_t ipc_space_create(/* ipc_table_size_t, ipc_space_t * */);
+kern_return_t ipc_space_create(ipc_table_size_t, ipc_space_t *);
kern_return_t ipc_space_create_special(struct ipc_space **);
void ipc_space_destroy(struct ipc_space *);
diff --git a/ipc/ipc_table.h b/ipc/ipc_table.h
index 3bfcc46..695adae 100644
--- a/ipc/ipc_table.h
+++ b/ipc/ipc_table.h
@@ -81,7 +81,7 @@ extern ipc_table_size_t ipc_table_entries;
extern ipc_table_size_t ipc_table_dnrequests;
extern void
-ipc_table_init();
+ipc_table_init(void);
/*
* Note that ipc_table_alloc, ipc_table_realloc, and ipc_table_free
diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c
index ddb277c..e6bcf61 100644
--- a/ipc/mach_msg.c
+++ b/ipc/mach_msg.c
@@ -283,7 +283,7 @@ mach_msg_receive(msg, option, rcv_size, rcv_name, time_out, notify)
*/
void
-mach_msg_receive_continue()
+mach_msg_receive_continue(void)
{
ipc_thread_t self = current_thread();
ipc_space_t space = current_space();
@@ -1673,7 +1673,7 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
*/
void
-mach_msg_continue()
+mach_msg_continue(void)
{
ipc_thread_t thread = current_thread();
task_t task = thread->task;
diff --git a/ipc/mach_msg.h b/ipc/mach_msg.h
index f7d22e3..ce0fe4d 100644
--- a/ipc/mach_msg.h
+++ b/ipc/mach_msg.h
@@ -40,21 +40,21 @@
#include <mach/message.h>
extern mach_msg_return_t
-mach_msg_send(/* mach_msg_header_t *, mach_msg_option_t,
- mach_msg_size_t, mach_msg_timeout_t, mach_port_t */);
+mach_msg_send(mach_msg_header_t *, mach_msg_option_t,
+ mach_msg_size_t, mach_msg_timeout_t, mach_port_t);
extern mach_msg_return_t
-mach_msg_receive(/* mach_msg_header_t *, mach_msg_option_t,
- mach_msg_size_t, mach_port_t,
- mach_msg_timeout_t, mach_port_t */);
+mach_msg_receive(mach_msg_header_t *, mach_msg_option_t,
+ mach_msg_size_t, mach_port_t,
+ mach_msg_timeout_t, mach_port_t);
extern void
-mach_msg_receive_continue();
+mach_msg_receive_continue(void);
extern void
-mach_msg_continue();
+mach_msg_continue(void);
extern boolean_t
-mach_msg_interrupt(/* thread_t */);
+mach_msg_interrupt(thread_t);
#endif /* _IPC_MACH_MSG_H_ */
diff --git a/kern/ast.c b/kern/ast.c
index d692a99..d46f0d6 100644
--- a/kern/ast.c
+++ b/kern/ast.c
@@ -66,7 +66,7 @@ ast_init()
}
void
-ast_taken()
+ast_taken(void)
{
register thread_t self = current_thread();
register ast_t reasons;
diff --git a/kern/ast.h b/kern/ast.h
index ba22af8..6fd509c 100644
--- a/kern/ast.h
+++ b/kern/ast.h
@@ -83,7 +83,7 @@ extern volatile ast_t need_ast[NCPUS];
#endif /* MACHINE_AST */
-extern void ast_taken();
+extern void ast_taken(void);
/*
* ast_needed, ast_on, ast_off, ast_context, and ast_propagate
diff --git a/kern/debug.c b/kern/debug.c
index c6e0257..d07f1ed 100644
--- a/kern/debug.c
+++ b/kern/debug.c
@@ -115,7 +115,7 @@ const char *panicstr;
int paniccpu;
void
-panic_init()
+panic_init(void)
{
if (!panic_lock_initialized)
{
diff --git a/kern/debug.h b/kern/debug.h
index 62be7fc..64fbf8a 100644
--- a/kern/debug.h
+++ b/kern/debug.h
@@ -57,7 +57,7 @@
#endif /* NDEBUG */
-extern void panic_init();
+extern void panic_init(void);
extern void panic (const char *s, ...) __attribute__ ((noreturn));
#endif /* _mach_debug__debug_ */
diff --git a/kern/ipc_tt.c b/kern/ipc_tt.c
index fb89fac..e14ebac 100644
--- a/kern/ipc_tt.c
+++ b/kern/ipc_tt.c
@@ -537,7 +537,7 @@ mach_task_self(void)
*/
mach_port_t
-mach_thread_self()
+mach_thread_self(void)
{
thread_t thread = current_thread();
task_t task = thread->task;
diff --git a/kern/ipc_tt.h b/kern/ipc_tt.h
index 0e6ce9d..e2009b9 100644
--- a/kern/ipc_tt.h
+++ b/kern/ipc_tt.h
@@ -28,61 +28,62 @@
#define _KERN_IPC_TT_H_
#include <mach/boolean.h>
+#include <mach/mach_types.h>
#include <mach/port.h>
-extern void ipc_task_init();
-extern void ipc_task_enable();
-extern void ipc_task_disable();
-extern void ipc_task_terminate();
+extern void ipc_task_init(task_t, task_t);
+extern void ipc_task_enable(task_t);
+extern void ipc_task_disable(task_t);
+extern void ipc_task_terminate(task_t);
-extern void ipc_thread_init();
-extern void ipc_thread_enable();
-extern void ipc_thread_disable();
-extern void ipc_thread_terminate();
+extern void ipc_thread_init(thread_t);
+extern void ipc_thread_enable(thread_t);
+extern void ipc_thread_disable(thread_t);
+extern void ipc_thread_terminate(thread_t);
extern struct ipc_port *
-retrieve_task_self(/* task_t */);
+retrieve_task_self(task_t);
extern struct ipc_port *
-retrieve_task_self_fast(/* task_t */);
+retrieve_task_self_fast(task_t);
extern struct ipc_port *
-retrieve_thread_self(/* thread_t */);
+retrieve_thread_self(thread_t);
extern struct ipc_port *
-retrieve_thread_self_fast(/* thread_t */);
+retrieve_thread_self_fast(thread_t);
extern struct ipc_port *
-retrieve_task_exception(/* task_t */);
+retrieve_task_exception(task_t);
extern struct ipc_port *
-retrieve_thread_exception(/* thread_t */);
+retrieve_thread_exception(thread_t);
extern struct task *
-convert_port_to_task(/* struct ipc_port * */);
+convert_port_to_task(struct ipc_port *);
extern struct ipc_port *
-convert_task_to_port(/* task_t */);
+convert_task_to_port(task_t);
extern void
-task_deallocate(/* task_t */);
+task_deallocate(task_t);
extern struct thread *
-convert_port_to_thread(/* struct ipc_port * */);
+convert_port_to_thread(struct ipc_port *);
extern struct ipc_port *
-convert_thread_to_port(/* thread_t */);
+convert_thread_to_port(thread_t);
extern void
-thread_deallocate(/* thread_t */);
+thread_deallocate(thread_t);
extern struct vm_map *
-convert_port_to_map(/* struct ipc_port * */);
+convert_port_to_map(struct ipc_port *);
extern struct ipc_space *
-convert_port_to_space(/* struct ipc_port * */);
+convert_port_to_space(struct ipc_port *);
extern void
-space_deallocate(/* ipc_space_t */);
+space_deallocate(ipc_space_t);
#endif /* _KERN_IPC_TT_H_ */
diff --git a/kern/mach_factor.c b/kern/mach_factor.c
index 89e1851..6fbda83 100644
--- a/kern/mach_factor.c
+++ b/kern/mach_factor.c
@@ -55,7 +55,7 @@ static long fract[3] = {
983, /* (59.0/60.) 1 minute average */
};
-void compute_mach_factor()
+void compute_mach_factor(void)
{
register processor_set_t pset;
register processor_t processor;
diff --git a/kern/mach_factor.h b/kern/mach_factor.h
index 81624bb..0ec64be 100644
--- a/kern/mach_factor.h
+++ b/kern/mach_factor.h
@@ -1,6 +1,5 @@
/*
- *
- * Copyright (C) 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2006, 2007 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,6 +26,6 @@
#include <sys/types.h>
-extern void compute_mach_factor();
+extern void compute_mach_factor(void);
#endif /* _KERN_MACH_FACTOR_H_ */
diff --git a/kern/printf.c b/kern/printf.c
index 74bb6c4..99dffbd 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -153,7 +153,7 @@ boolean_t _doprnt_truncates = FALSE;
boolean_t _doprnt_lock_initialized = FALSE;
decl_simple_lock_data(,_doprnt_lock)
-void printf_init()
+void printf_init(void)
{
if (!_doprnt_lock_initialized)
{
diff --git a/kern/printf.h b/kern/printf.h
index f5930dc..6d41eb8 100644
--- a/kern/printf.h
+++ b/kern/printf.h
@@ -1,6 +1,6 @@
/*
* Header file for printf type functions.
- * Copyright (C) 2006 Free Software Foundation.
+ * Copyright (C) 2006, 2007 Free Software Foundation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
#include <sys/types.h>
#include <stdarg.h>
-extern void printf_init ();
+extern void printf_init (void);
extern void _doprnt (const char *fmt,
va_list *argp,
diff --git a/kern/queue.h b/kern/queue.h
index 3481db3..97a0a76 100644
--- a/kern/queue.h
+++ b/kern/queue.h
@@ -79,11 +79,11 @@ typedef struct queue_entry *queue_entry_t;
#define enqueue(queue,elt) enqueue_tail(queue, elt)
#define dequeue(queue) dequeue_head(queue)
-void enqueue_head();
-void enqueue_tail();
-queue_entry_t dequeue_head();
-queue_entry_t dequeue_tail();
-void remqueue();
+void enqueue_head(queue_t, queue_entry_t);
+void enqueue_tail(queue_t, queue_entry_t);
+queue_entry_t dequeue_head(queue_t);
+queue_entry_t dequeue_tail(queue_t);
+void remqueue(queue_t, queue_entry_t);
/*
* Macro: queue_init
diff --git a/kern/sched.h b/kern/sched.h
index c4ff647..434e022 100644
--- a/kern/sched.h
+++ b/kern/sched.h
@@ -37,6 +37,7 @@
#include <kern/queue.h>
#include <kern/lock.h>
+#include <kern/kern_types.h>
#include <kern/macro_help.h>
#if MACH_FIXPRI
@@ -106,8 +107,8 @@ typedef struct run_queue *run_queue_t;
* Scheduler routines.
*/
-extern struct run_queue *rem_runq();
-extern struct thread *choose_thread();
+extern struct run_queue *rem_runq(thread_t);
+extern struct thread *choose_thread(processor_t);
extern queue_head_t action_queue; /* assign/shutdown queue */
decl_simple_lock_data(extern,action_lock);
diff --git a/kern/syscall_subr.c b/kern/syscall_subr.c
index 28119f1..4db1f16 100644
--- a/kern/syscall_subr.c
+++ b/kern/syscall_subr.c
@@ -62,10 +62,10 @@
* lock and then be a good citizen and really suspend.
*/
-extern void thread_depress_priority();
-extern kern_return_t thread_depress_abort();
+extern void thread_depress_priority(thread_t, mach_msg_timeout_t);
+extern kern_return_t thread_depress_abort(thread_t);
-void swtch_continue()
+void swtch_continue(void)
{
register processor_t myprocessor;
@@ -75,7 +75,7 @@ void swtch_continue()
/*NOTREACHED*/
}
-boolean_t swtch()
+boolean_t swtch(void)
{
register processor_t myprocessor;
@@ -93,7 +93,7 @@ boolean_t swtch()
myprocessor->processor_set->runq.count > 0);
}
-void swtch_pri_continue()
+void swtch_pri_continue(void)
{
register thread_t thread = current_thread();
register processor_t myprocessor;
@@ -139,7 +139,7 @@ boolean_t swtch_pri(pri)
myprocessor->processor_set->runq.count > 0);
}
-void thread_switch_continue()
+void thread_switch_continue(void)
{
register thread_t cur_thread = current_thread();
diff --git a/kern/syscall_subr.h b/kern/syscall_subr.h
index 8790d73..4ac9489 100644
--- a/kern/syscall_subr.h
+++ b/kern/syscall_subr.h
@@ -27,9 +27,9 @@
#ifndef _KERN_SYSCALL_SUBR_H_
#define _KERN_SYSCALL_SUBR_H_
-extern int swtch();
-extern int swtch_pri();
-extern int thread_switch();
-extern void thread_depress_timeout();
+extern int swtch(void);
+extern int swtch_pri(int);
+extern int thread_switch(mach_port_t, int, mach_msg_timeout_t);
+extern void thread_depress_timeout(thread_t);
#endif /* _KERN_SYSCALL_SUBR_H_ */
diff --git a/kern/task.h b/kern/task.h
index e467a2f..8c905c2 100644
--- a/kern/task.h
+++ b/kern/task.h
@@ -150,16 +150,14 @@ extern kern_return_t task_assign_default(
* Internal only routines
*/
-extern void task_init();
-extern void task_reference();
-extern void task_deallocate();
-extern kern_return_t task_hold();
-extern kern_return_t task_dowait();
-extern kern_return_t task_release();
-extern kern_return_t task_halt();
-
-extern kern_return_t task_suspend_nowait();
-extern task_t kernel_task_create();
+extern void task_init(void);
+extern void task_reference(task_t);
+extern void task_deallocate(task_t);
+extern kern_return_t task_hold(task_t);
+extern kern_return_t task_dowait(task_t, boolean_t);
+extern kern_return_t task_release(task_t);
+
+extern task_t kernel_task_create(task_t, vm_size_t);
extern task_t kernel_task;
diff --git a/kern/thread_swap.c b/kern/thread_swap.c
index b75e0f4..f29bd5b 100644
--- a/kern/thread_swap.c
+++ b/kern/thread_swap.c
@@ -70,7 +70,7 @@ decl_simple_lock_data(, swapper_lock_data)
*
* Initialize the swapper module.
*/
-void swapper_init()
+void swapper_init(void)
{
queue_init(&swapin_queue);
simple_lock_init(&swapper_lock_data);
@@ -154,7 +154,7 @@ void thread_doswapin(thread)
* This procedure executes as a kernel thread. Threads that need to
* be swapped in are swapped in by this thread.
*/
-void swapin_thread_continue()
+void swapin_thread_continue(void)
{
for (;;) {
register thread_t thread;
@@ -182,7 +182,7 @@ void swapin_thread_continue()
}
}
-void swapin_thread()
+void swapin_thread(void)
{
stack_privilege(current_thread());
diff --git a/kern/thread_swap.h b/kern/thread_swap.h
index c08f39f..3113030 100644
--- a/kern/thread_swap.h
+++ b/kern/thread_swap.h
@@ -35,10 +35,10 @@
/*
* exported routines
*/
-extern void swapper_init();
-extern void thread_swapin( /* thread_t thread */ );
-extern void thread_doswapin( /* thread_t thread */ );
-extern void swapin_thread();
-extern void thread_swapout( /* thread_t thread */ );
+extern void swapper_init(void);
+extern void thread_swapin(thread_t thread);
+extern void thread_doswapin(thread_t thread);
+extern void swapin_thread(void);
+extern void thread_swapout(thread_t thread);
#endif /* _KERN_THREAD_SWAP_H_ */
diff --git a/kern/timer.h b/kern/timer.h
index 4018236..07e46fc 100644
--- a/kern/timer.h
+++ b/kern/timer.h
@@ -124,13 +124,13 @@ typedef struct timer_save timer_save_data_t, *timer_save_t;
#define start_timer(timer)
#define timer_switch(timer)
#else /* STAT_TIME */
-extern void start_timer();
-extern void timer_switch();
+extern void start_timer(timer_t);
+extern void timer_switch(timer_t);
#endif /* STAT_TIME */
-extern void timer_read();
-extern void thread_read_times();
-extern unsigned timer_delta();
+extern void timer_read(timer_t, time_value_t *);
+extern void thread_read_times(thread_t, time_value_t *, time_value_t *);
+extern unsigned timer_delta(timer_t, timer_save_t);
#if STAT_TIME
/*
@@ -148,10 +148,10 @@ MACRO_END
/*
* Exported hardware interface to timers
*/
-extern void time_trap_uentry();
-extern void time_trap_uexit();
-extern timer_t time_int_entry();
-extern void time_int_exit();
+extern void time_trap_uentry(unsigned);
+extern void time_trap_uexit(int);
+extern timer_t time_int_entry(unsigned, timer_t);
+extern void time_int_exit(unsigned, timer_t);
#endif /* STAT_TIME */
/*
diff --git a/kern/xpr.c b/kern/xpr.c
index af494d2..465ba7b 100644
--- a/kern/xpr.c
+++ b/kern/xpr.c
@@ -88,7 +88,7 @@ int arg1, arg2, arg3, arg4, arg5;
x->cpuinfo = cpu_number();
}
-void xprbootstrap()
+void xprbootstrap(void)
{
vm_offset_t addr;
vm_size_t size;
@@ -125,7 +125,7 @@ void xprbootstrap()
int xprinitial = 0;
-void xprinit()
+void xprinit(void)
{
xprflags |= xprinitial;
}
diff --git a/kern/xpr.h b/kern/xpr.h
index 1e1204d..4a06216 100644
--- a/kern/xpr.h
+++ b/kern/xpr.h
@@ -89,11 +89,9 @@ struct xprbuf {
int cpuinfo;
};
-#ifndef WANT_PROTOTYPES
-extern void xpr();
-#endif
-extern void xpr_dump();
-extern void xprinit();
-extern void xprbootstrap();
+extern void xpr(char *, int, int, int, int, int);
+extern void xpr_dump(struct xprbuf *, int);
+extern void xprinit(void);
+extern void xprbootstrap(void);
#endif /* _KERN_XPR_H_ */
diff --git a/kern/zalloc.c b/kern/zalloc.c
index 9728d46..126937e 100644
--- a/kern/zalloc.c
+++ b/kern/zalloc.c
@@ -95,10 +95,10 @@ extern vm_offset_t zone_map_min_address;
(&(zone_page_table[(atop(((vm_offset_t)addr) - zone_map_min_address))]))
-extern void zone_page_alloc();
-extern void zone_page_dealloc();
-extern void zone_page_in_use();
-extern void zone_page_free();
+extern void zone_page_alloc(vm_offset_t, vm_size_t);
+extern void zone_page_dealloc(vm_offset_t, vm_size_t);
+extern void zone_page_in_use(vm_offset_t, vm_size_t);
+extern void zone_page_free(vm_offset_t, vm_size_t);
zone_t zone_zone; /* this is the zone containing other zones */
@@ -165,7 +165,7 @@ vm_offset_t zone_map_min_address;
vm_offset_t zone_map_max_address;
int zone_pages;
-extern void zone_page_init();
+extern void zone_page_init(vm_offset_t, vm_size_t, int);
#define ZONE_PAGE_USED 0
#define ZONE_PAGE_UNUSED -1
@@ -361,7 +361,7 @@ static vm_offset_t zget_space(vm_offset_t size, vm_size_t align)
* earlier in memory initialization. zone_bootstrap is called
* before zone_init.
*/
-void zone_bootstrap()
+void zone_bootstrap(void)
{
simple_lock_init(&all_zones_lock);
first_zone = ZONE_NULL;
@@ -378,7 +378,7 @@ void zone_bootstrap()
sizeof(struct zone), 0, "zones");
}
-void zone_init()
+void zone_init(void)
{
vm_offset_t zone_min;
vm_offset_t zone_max;
@@ -732,7 +732,7 @@ struct zone_free_entry {
* pages. zone_gc is called by consider_zone_gc when the system
* begins to run out of memory.
*/
-static void zone_gc()
+static void zone_gc(void)
{
int max_zones;
zone_t z;
@@ -841,7 +841,7 @@ unsigned zone_gc_max_rate = 0; /* in ticks */
*/
void
-consider_zone_gc()
+consider_zone_gc(void)
{
/*
* By default, don't attempt zone GC more frequently
diff --git a/kern/zalloc.h b/kern/zalloc.h
index 3f9bf21..f1a1850 100644
--- a/kern/zalloc.h
+++ b/kern/zalloc.h
@@ -80,11 +80,11 @@ void zfree(zone_t zone, vm_offset_t elem);
void zcram(zone_t zone, vm_offset_t newmem, vm_size_t size);
/* Exported only to vm/vm_init.c */
-void zone_bootstrap();
-void zone_init();
+void zone_bootstrap(void);
+void zone_init(void);
/* Exported only to vm/vm_pageout.c */
-void consider_zone_gc();
+void consider_zone_gc(void);
/* Memory type bits for zones */