summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-04-05 06:39:21 +0000
committerRoland McGrath <roland@gnu.org>2001-04-05 06:39:21 +0000
commitb42bd0d675ec7d1e1fbbf274fadbea984c8dab22 (patch)
treea7f61083f2dfa365d5d9e7101c72e8cb5b3b16a9 /kern
parent2d43f4abdedd003eb070d633bac0e3a6fb3a746b (diff)
2001-04-04 Roland McGrath <roland@frob.com>
* ddb/db_access.h: Fix obsolescent #else/#endif syntax. * ddb/db_aout.c: Likewise. * ddb/db_break.c: Likewise. * ddb/db_break.h: Likewise. * ddb/db_command.c: Likewise. * ddb/db_command.h: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_examine.c: Likewise. * ddb/db_expr.c: Likewise. * ddb/db_ext_symtab.c: Likewise. * ddb/db_input.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_mp.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_run.c: Likewise. * ddb/db_sym.c: Likewise. * ddb/db_task_thread.c: Likewise. * ddb/db_task_thread.h: Likewise. * ddb/db_trap.c: Likewise. * ddb/db_variables.c: Likewise. * ddb/db_watch.c: Likewise. * ddb/db_watch.h: Likewise. * ddb/db_write_cmd.c: Likewise. * device/dev_pager.c: Likewise. * device/device_port.h: Likewise. * device/device_types_kernel.h: Likewise. * device/ds_routines.h: Likewise. * device/errno.h: Likewise. * device/if_ether.h: Likewise. * device/if_hdr.h: Likewise. * device/io_req.h: Likewise. * device/net_io.c: Likewise. * device/net_io.h: Likewise. * i386/i386/ast_check.c: Likewise. * i386/i386/cswitch.S: Likewise. * i386/i386/db_disasm.c: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/db_trace.c: Likewise. * i386/i386/debug.h: Likewise. * i386/i386/debug_i386.c: Likewise. * i386/i386/debug_trace.S: Likewise. * i386/i386/eflags.h: Likewise. * i386/i386/gdt.h: Likewise. * i386/i386/hardclock.c: Likewise. * i386/i386/idt-gen.h: Likewise. * i386/i386/ipl.h: Likewise. * i386/i386/ktss.h: Likewise. * i386/i386/kttd_interface.c: Likewise. * i386/i386/ldt.h: Likewise. * i386/i386/lock.h: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/mp_desc.h: Likewise. * i386/i386/pic.c: Likewise. * i386/i386/pic.h: Likewise. * i386/i386/pio.h: Likewise. * i386/i386/pit.h: Likewise. * i386/i386/seg.h: Likewise. * i386/i386/thread.h: Likewise. * i386/i386/trap.c: Likewise. * i386/i386/trap.h: Likewise. * i386/i386/vm_param.h: Likewise. * i386/i386/vm_tuning.h: Likewise. * i386/i386at/autoconf.c: Likewise. * i386/i386at/blit.c: Likewise. * i386/i386at/conf.c: Likewise. * i386/i386at/fd.c: Likewise. * i386/i386at/idt.h: Likewise. * i386/i386at/immc.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386at/rtc.c: Likewise. * i386/include/mach/i386/asm.h: Likewise. * i386/include/mach/i386/eflags.h: Likewise. * i386/include/mach/i386/mach_i386.defs: Likewise. * i386/include/mach/i386/multiboot.h: Likewise. * i386/include/mach/i386/trap.h: Likewise. * i386/include/mach/i386/vm_types.h: Likewise. * i386/include/mach/sa/stdarg.h: Likewise. * i386/intel/pmap.c: Likewise. * i386/intel/pmap.h: Likewise. * include/alloca.h: Likewise. * include/device/device_types.defs: Likewise. * include/device/device_types.h: Likewise. * include/device/disk_status.h: Likewise. * include/device/net_status.h: Likewise. * include/mach/mach.defs: Likewise. * include/mach/memory_object.defs: Likewise. * include/mach/std_types.defs: Likewise. * include/mach_debug/hash_info.h: Likewise. * include/mach_debug/ipc_info.h: Likewise. * include/mach_debug/mach_debug.defs: Likewise. * include/mach_debug/mach_debug_types.defs: Likewise. * include/mach_debug/mach_debug_types.h: Likewise. * include/mach_debug/vm_info.h: Likewise. * include/mach_debug/zone_info.h: Likewise. * include/sys/ioctl.h: Likewise. * include/sys/time.h: Likewise. * ipc/ipc_entry.h: Likewise. * ipc/ipc_hash.h: Likewise. * ipc/ipc_init.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_marequest.h: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_mqueue.h: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_notify.h: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_object.h: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_port.h: Likewise. * ipc/ipc_pset.c: Likewise. * ipc/ipc_pset.h: Likewise. * ipc/ipc_right.c: Likewise. * ipc/ipc_right.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/mach_debug.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_msg.h: Likewise. * ipc/mach_port.c: Likewise. * kern/act.c: Likewise. * kern/assert.h: Likewise. * kern/ast.c: Likewise. * kern/ast.h: Likewise. * kern/bootstrap.c: Likewise. * kern/counters.c: Likewise. * kern/counters.h: Likewise. * kern/debug.h: Likewise. * kern/exception.c: Likewise. * kern/host.h: Likewise. * kern/ipc_host.c: Likewise. * kern/ipc_host.h: Likewise. * kern/ipc_kobject.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/ipc_tt.h: Likewise. * kern/kalloc.h: Likewise. * kern/lock_mon.c: Likewise. * kern/mach_clock.c: Likewise. * kern/mach_factor.c: Likewise. * kern/mach_param.h: Likewise. * kern/machine.c: Likewise. * kern/processor.c: Likewise. * kern/profile.c: Likewise. * kern/queue.h: Likewise. * kern/sched.h: Likewise. * kern/startup.c: Likewise. * kern/syscall_emulation.h: Likewise. * kern/syscall_subr.c: Likewise. * kern/syscall_subr.h: Likewise. * kern/syscall_sw.c: Likewise. * kern/syscall_sw.h: Likewise. * kern/task.h: Likewise. * kern/thread_swap.h: Likewise. * kern/time_out.h: Likewise. * kern/time_stamp.c: Likewise. * kern/time_stamp.h: Likewise. * kern/timer.c: Likewise. * kern/timer.h: Likewise. * kern/xpr.c: Likewise. * kern/xpr.h: Likewise. * kern/zalloc.c: Likewise. * kern/zalloc.h: Likewise. * linux/dev/drivers/block/ide.c: Likewise. * linux/dev/include/linux/blk.h: Likewise. * linux/src/include/linux/cdrom.h: Likewise. * linux/src/include/linux/md.h: Likewise. * util/cpu.h: Likewise. * vm/memory_object.c: Likewise. * vm/memory_object.h: Likewise. * vm/pmap.h: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_external.h: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_fault.h: Likewise. * vm/vm_kern.h: Likewise. * vm/vm_map.c: Likewise. * vm/vm_map.h: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_pageout.h: Likewise. * vm/vm_user.h: Likewise.
Diffstat (limited to 'kern')
-rw-r--r--kern/act.c4
-rw-r--r--kern/assert.h22
-rw-r--r--kern/ast.c12
-rw-r--r--kern/ast.h6
-rw-r--r--kern/bootstrap.c2
-rw-r--r--kern/counters.c14
-rw-r--r--kern/counters.h20
-rw-r--r--kern/debug.h6
-rw-r--r--kern/exception.c18
-rw-r--r--kern/host.h14
-rw-r--r--kern/ipc_host.c2
-rw-r--r--kern/ipc_host.h2
-rw-r--r--kern/ipc_kobject.c30
-rw-r--r--kern/ipc_mig.c40
-rw-r--r--kern/ipc_tt.c18
-rw-r--r--kern/ipc_tt.h14
-rw-r--r--kern/kalloc.h14
-rw-r--r--kern/lock_mon.c33
-rw-r--r--kern/mach_clock.c12
-rw-r--r--kern/mach_factor.c16
-rw-r--r--kern/mach_param.h2
-rw-r--r--kern/machine.c2
-rw-r--r--kern/processor.c24
-rw-r--r--kern/profile.c68
-rw-r--r--kern/queue.h10
-rw-r--r--kern/sched.h26
-rw-r--r--kern/startup.c16
-rw-r--r--kern/syscall_emulation.h4
-rw-r--r--kern/syscall_subr.c22
-rw-r--r--kern/syscall_subr.h14
-rw-r--r--kern/syscall_sw.c4
-rw-r--r--kern/syscall_sw.h14
-rw-r--r--kern/task.h16
-rw-r--r--kern/thread_swap.h14
-rw-r--r--kern/time_out.h2
-rw-r--r--kern/time_stamp.c22
-rw-r--r--kern/time_stamp.h20
-rw-r--r--kern/timer.c40
-rw-r--r--kern/timer.h28
-rw-r--r--kern/xpr.c14
-rw-r--r--kern/xpr.h28
-rw-r--r--kern/zalloc.c2
-rw-r--r--kern/zalloc.h2
43 files changed, 344 insertions, 349 deletions
diff --git a/kern/act.c b/kern/act.c
index 697804f..0d0baea 100644
--- a/kern/act.c
+++ b/kern/act.c
@@ -934,7 +934,7 @@ act_get_special_port(Act *act, int which, ipc_port_t *portp)
case THREAD_REPLY_PORT:
whichp = &act->reply_port;
break;
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
case THREAD_KERNEL_PORT:
whichp = &act->self_port;
@@ -994,7 +994,7 @@ act_set_special_port(Act *act, int which, ipc_port_t port)
case THREAD_REPLY_PORT:
whichp = &act->reply_port;
break;
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
case THREAD_KERNEL_PORT:
whichp = &act->self_port;
diff --git a/kern/assert.h b/kern/assert.h
index f98662b..26214e3 100644
--- a/kern/assert.h
+++ b/kern/assert.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -46,13 +46,13 @@ MACRO_END
#ifdef lint
#define assert_static(x)
-#else lint
+#else /* lint */
#define assert_static(x) assert(x)
-#endif lint
+#endif /* lint */
-#else MACH_ASSERT
+#else /* MACH_ASSERT */
#define assert(ex)
#define assert_static(ex)
-#endif MACH_ASSERT
+#endif /* MACH_ASSERT */
-#endif _KERN_ASSERT_H_
+#endif /* _KERN_ASSERT_H_ */
diff --git a/kern/ast.c b/kern/ast.c
index fc26f94..9b3a9bd 100644
--- a/kern/ast.c
+++ b/kern/ast.c
@@ -52,7 +52,7 @@
#if MACH_FIXPRI
#include <mach/policy.h>
-#endif MACH_FIXPRI
+#endif /* MACH_FIXPRI */
volatile ast_t need_ast[NCPUS];
@@ -65,7 +65,7 @@ ast_init()
for (i=0; i<NCPUS; i++)
need_ast[i] = 0;
-#endif MACHINE_AST
+#endif /* MACHINE_AST */
}
void
@@ -93,7 +93,7 @@ ast_taken()
#if NORMA_IPC
if (reasons & AST_NETIPC)
netipc_ast();
-#endif NORMA_IPC
+#endif /* NORMA_IPC */
/*
* Make darn sure that we don't call thread_halt_self
@@ -152,7 +152,7 @@ ast_check()
*/
ast_on(mycpu, AST_BLOCK);
break;
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
case PROCESSOR_RUNNING:
@@ -194,7 +194,7 @@ ast_check()
}
}
else {
-#endif MACH_FIXPRI
+#endif /* MACH_FIXPRI */
rq = &(myprocessor->processor_set->runq);
if (!(myprocessor->first_quantum) && (rq->count > 0)) {
register queue_t q;
@@ -230,7 +230,7 @@ ast_check()
}
#if MACH_FIXPRI
}
-#endif MACH_FIXPRI
+#endif /* MACH_FIXPRI */
break;
default:
diff --git a/kern/ast.h b/kern/ast.h
index a7b8586..14a5535 100644
--- a/kern/ast.h
+++ b/kern/ast.h
@@ -78,12 +78,12 @@ extern volatile ast_t need_ast[NCPUS];
/*
* machine/ast.h is responsible for defining aston and astoff.
*/
-#else MACHINE_AST
+#else /* MACHINE_AST */
#define aston(mycpu)
#define astoff(mycpu)
-#endif MACHINE_AST
+#endif /* MACHINE_AST */
extern void ast_taken();
@@ -129,4 +129,4 @@ MACRO_END
* be followed by ast_propagate().
*/
-#endif _KERN_AST_H_
+#endif /* _KERN_AST_H_ */
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index d6dcad4..159276b 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -325,7 +325,7 @@ static void copy_bootstrap(void *e, struct exec_info *boot_exec_info)
}
}
#endif
-#endif MACH_KDB
+#endif /* MACH_KDB */
}
/*
diff --git a/kern/counters.c b/kern/counters.c
index 5b606f5..d10aa81 100644
--- a/kern/counters.c
+++ b/kern/counters.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -79,4 +79,4 @@ mach_counter_t c_net_thread_block = 0;
mach_counter_t c_reaper_thread_block = 0;
mach_counter_t c_swapin_thread_block = 0;
mach_counter_t c_action_thread_block = 0;
-#endif MACH_COUNTERS
+#endif /* MACH_COUNTERS */
diff --git a/kern/counters.h b/kern/counters.h
index 1f13ac5..be5d8bb 100644
--- a/kern/counters.h
+++ b/kern/counters.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -43,11 +43,11 @@
#define counter(code) counter_always(code)
-#else MACH_COUNTERS
+#else /* MACH_COUNTERS */
#define counter(code)
-#endif MACH_COUNTERS
+#endif /* MACH_COUNTERS */
/*
* We define the counters with individual integers,
@@ -102,6 +102,6 @@ extern mach_counter_t c_net_thread_block;
extern mach_counter_t c_reaper_thread_block;
extern mach_counter_t c_swapin_thread_block;
extern mach_counter_t c_action_thread_block;
-#endif MACH_COUNTERS
+#endif /* MACH_COUNTERS */
-#endif _KERN_COUNTERS_
+#endif /* _KERN_COUNTERS_ */
diff --git a/kern/debug.h b/kern/debug.h
index 3520140..0c4ddf2 100644
--- a/kern/debug.h
+++ b/kern/debug.h
@@ -46,7 +46,7 @@
__FILE__, __LINE__, (p), (id), (p->struct_id)); \
})
-#else !DEBUG
+#else /* !DEBUG */
#define otsan()
@@ -55,6 +55,6 @@
#define struct_id_denit(p)
#define struct_id_verify(p,id)
-#endif !DEBUG
+#endif /* !DEBUG */
-#endif _mach_debug__debug_
+#endif /* _mach_debug__debug_ */
diff --git a/kern/exception.c b/kern/exception.c
index c7e0326..6820bbf 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1993,1992,1991,1990,1989,1988,1987 Carnegie Mellon University.
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -76,7 +76,7 @@ boolean_t debug_user_with_kdb = FALSE;
* The exception function is expected to return.
* So the return statements along the slow paths are important.
*/
-#endif KEEP_STACKS
+#endif /* KEEP_STACKS */
/*
* Routine: exception
@@ -260,7 +260,7 @@ exception_no_server()
db_printf("No exception server, calling kdb...\n");
thread_kdb_return();
}
-#endif MACH_KDB
+#endif /* MACH_KDB */
/*
* All else failed; terminate task.
@@ -422,7 +422,7 @@ exception_raise(dest_port, thread_port, task_port,
if (!ip_active(dest_port) ||
#if NORMA_IPC
IP_NORMA_IS_PROXY(dest_port) ||
-#endif NORMA_IPC
+#endif /* NORMA_IPC */
(dest_port->ip_receiver == ipc_space_kernel)) {
imq_unlock(reply_mqueue);
ip_unlock(dest_port);
diff --git a/kern/host.h b/kern/host.h
index 0807f99..5771da1 100644
--- a/kern/host.h
+++ b/kern/host.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -45,4 +45,4 @@ typedef struct host host_data_t;
extern host_data_t realhost;
-#endif _KERN_HOST_H_
+#endif /* _KERN_HOST_H_ */
diff --git a/kern/ipc_host.c b/kern/ipc_host.c
index 4dbf9fc..d4049d2 100644
--- a/kern/ipc_host.c
+++ b/kern/ipc_host.c
@@ -126,7 +126,7 @@ host_self(void)
ipc_port_copyout_send_compat(sright, current_space());
}
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
/*
* ipc_processor_init:
diff --git a/kern/ipc_host.h b/kern/ipc_host.h
index 13c54cf..cd2ffaa 100644
--- a/kern/ipc_host.h
+++ b/kern/ipc_host.h
@@ -69,4 +69,4 @@ convert_port_to_pset_name(struct ipc_port *);
extern struct ipc_port *
convert_pset_name_to_port(processor_set_t);
-#endif _KERN_IPC_HOST_H_
+#endif /* _KERN_IPC_HOST_H_ */
diff --git a/kern/ipc_kobject.c b/kern/ipc_kobject.c
index 2b37205..5c6e011 100644
--- a/kern/ipc_kobject.c
+++ b/kern/ipc_kobject.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -176,18 +176,18 @@ ipc_kobject_server(request)
|| (routine = device_pager_server_routine(&request->ikm_header)) != 0
#if MACH_DEBUG
|| (routine = mach_debug_server_routine(&request->ikm_header)) != 0
-#endif MACH_DEBUG
+#endif /* MACH_DEBUG */
#if NORMA_TASK
|| (routine = mach_norma_server_routine(&request->ikm_header)) != 0
|| (routine = norma_internal_server_routine(&request->ikm_header)) != 0
-#endif NORMA_TASK
+#endif /* NORMA_TASK */
#if NORMA_VM
|| (routine = proxy_server_routine(&request->ikm_header)) != 0
-#endif NORMA_VM
+#endif /* NORMA_VM */
|| (routine = mach4_server_routine(&request->ikm_header)) != 0
#if MACH_MACHINE_ROUTINES
|| (routine = MACHINE_SERVER_ROUTINE(&request->ikm_header)) != 0
-#endif MACH_MACHINE_ROUTINES
+#endif /* MACH_MACHINE_ROUTINES */
) {
(*routine)(&request->ikm_header, &reply->ikm_header);
}
@@ -197,7 +197,7 @@ ipc_kobject_server(request)
#if MACH_IPC_TEST
printf("ipc_kobject_server: bogus kernel message, id=%d\n",
request->ikm_header.msgh_id);
-#endif MACH_IPC_TEST
+#endif /* MACH_IPC_TEST */
}
}
check_simple_locks();
@@ -218,11 +218,11 @@ ipc_kobject_server(request)
case MACH_MSG_TYPE_PORT_SEND:
ipc_port_release_send(*destp);
break;
-
+
case MACH_MSG_TYPE_PORT_SEND_ONCE:
ipc_port_release_sonce(*destp);
break;
-
+
default:
#if MACH_ASSERT
assert(!"ipc_object_destroy: strange destination rights");
@@ -336,7 +336,7 @@ ipc_kobject_destroy(
#if MACH_ASSERT
printf("ipc_kobject_destroy: port 0x%x, kobj 0x%x, type %d\n",
port, port->ip_kobject, ip_kotype(port));
-#endif MACH_ASSERT
+#endif /* MACH_ASSERT */
break;
}
}
@@ -380,7 +380,7 @@ ipc_kobject_notify(request_header, reply_header)
case IKOT_XMM_REPLY:
return xmm_reply_notify(request_header);
-#endif NORMA_VM
+#endif /* NORMA_VM */
case IKOT_DEVICE:
return ds_notify(request_header);
diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c
index ed5df1f..f90c512 100644
--- a/kern/ipc_mig.c
+++ b/kern/ipc_mig.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -208,7 +208,7 @@ mach_msg_rpc_from_kernel(
ipc_kmsg_put_to_kernel(msg, kmsg, kmsg->ikm_header.msgh_size);
return MACH_MSG_SUCCESS;
}
-#endif NORMA_VM
+#endif /* NORMA_VM */
/*
* Routine: mach_msg_abort_rpc
@@ -371,7 +371,7 @@ mig_dealloc_reply_port(
/*
* Routine: mig_put_reply_port
* Purpose:
- * Called by client side interfaces after each RPC to
+ * Called by client side interfaces after each RPC to
* let the client recycle the reply port if it wishes.
*/
void
@@ -384,16 +384,16 @@ mig_put_reply_port(
* mig_strncpy.c - by Joshua Block
*
* mig_strncp -- Bounded string copy. Does what the library routine strncpy
- * OUGHT to do: Copies the (null terminated) string in src into dest, a
+ * OUGHT to do: Copies the (null terminated) string in src into dest, a
* buffer of length len. Assures that the copy is still null terminated
* and doesn't overflow the buffer, truncating the copy if necessary.
*
* Parameters:
- *
+ *
* dest - Pointer to destination buffer.
- *
+ *
* src - Pointer to source string.
- *
+ *
* len - Length of destination buffer.
*/
void mig_strncpy(dest, src, len)
@@ -444,10 +444,10 @@ port_name_to_device(name)
{
register ipc_port_t port;
register device_t device;
-
+
fast_send_right_lookup(name, port, goto abort);
/* port is locked */
-
+
/*
* Now map the port object to a device object.
* This is an inline version of dev_port_lookup().
@@ -456,25 +456,25 @@ port_name_to_device(name)
device = (device_t) port->ip_kobject;
device_reference(device);
ip_unlock(port);
- return device;
+ return device;
}
-
+
ip_unlock(port);
return DEVICE_NULL;
-
+
/*
* The slow case. The port wasn't easily accessible.
*/
abort: {
ipc_port_t kern_port;
kern_return_t kr;
-
+
kr = ipc_object_copyin(current_space(), name,
MACH_MSG_TYPE_COPY_SEND,
(ipc_object_t *) &kern_port);
if (kr != KERN_SUCCESS)
return DEVICE_NULL;
-
+
device = dev_port_lookup(kern_port);
if (IP_VALID(kern_port))
ipc_port_release_send(kern_port);
@@ -1130,5 +1130,3 @@ syscall_device_writev_request(mach_port_t device_name,
device_deallocate(dev);
return res;
}
-
-
diff --git a/kern/ipc_tt.c b/kern/ipc_tt.c
index d73b903..816124f 100644
--- a/kern/ipc_tt.c
+++ b/kern/ipc_tt.c
@@ -264,7 +264,7 @@ ipc_thread_init(thread)
thread->ith_reply = port;
}
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
}
/*
@@ -380,7 +380,7 @@ ipc_thread_terminate(thread)
* this behaviour, introducing a small incompatibility
* with the old IPC code.
*/
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
/* destroy the kernel port */
@@ -441,7 +441,7 @@ retrieve_thread_self(thread)
return port;
}
-#endif 0
+#endif /* 0 */
/*
* Routine: retrieve_task_self_fast
@@ -573,7 +573,7 @@ retrieve_thread_exception(thread)
return port;
}
-#endif 0
+#endif /* 0 */
/*
* Routine: mach_task_self [mach trap]
@@ -800,7 +800,7 @@ thread_reply()
return (port_name_t) name;
}
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
/*
* Routine: task_get_special_port [kernel call]
@@ -845,7 +845,7 @@ task_get_special_port(
*portp = port;
return KERN_SUCCESS;
}
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
case TASK_KERNEL_PORT:
whichp = &task->itk_sself;
@@ -922,7 +922,7 @@ task_set_special_port(
ipc_port_release_send(old);
return KERN_SUCCESS;
}
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
case TASK_KERNEL_PORT:
whichp = &task->itk_sself;
@@ -986,7 +986,7 @@ thread_get_special_port(thread, which, portp)
case THREAD_REPLY_PORT:
whichp = &thread->ith_reply;
break;
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
case THREAD_KERNEL_PORT:
whichp = &thread->ith_sself;
@@ -1045,7 +1045,7 @@ thread_set_special_port(thread, which, port)
case THREAD_REPLY_PORT:
whichp = &thread->ith_reply;
break;
-#endif MACH_IPC_COMPAT
+#endif /* MACH_IPC_COMPAT */
case THREAD_KERNEL_PORT:
whichp = &thread->ith_sself;
diff --git a/kern/ipc_tt.h b/kern/ipc_tt.h
index d53fb7c..0e6ce9d 100644
--- a/kern/ipc_tt.h
+++ b/kern/ipc_tt.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -85,4 +85,4 @@ convert_port_to_space(/* struct ipc_port * */);
extern void
space_deallocate(/* ipc_space_t */);
-#endif _KERN_IPC_TT_H_
+#endif /* _KERN_IPC_TT_H_ */
diff --git a/kern/kalloc.h b/kern/kalloc.h
index f36e4dc..4b24b49 100644
--- a/kern/kalloc.h
+++ b/kern/kalloc.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -37,4 +37,4 @@ extern void kfree();
extern void kalloc_init();
-#endif _KERN_KALLOC_H_
+#endif /* _KERN_KALLOC_H_ */
diff --git a/kern/lock_mon.c b/kern/lock_mon.c
index ef44329..143d914 100644
--- a/kern/lock_mon.c
+++ b/kern/lock_mon.c
@@ -1,4 +1,4 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1990 Carnegie-Mellon University
* Copyright (c) 1989 Carnegie-Mellon University
@@ -10,7 +10,7 @@
* Grenoble, FRANCE
*
* All Rights Reserved
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
@@ -19,7 +19,7 @@
* Foundation not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission.
- *
+ *
* OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
@@ -58,10 +58,10 @@ decl_simple_lock_data(extern , printf_lock)
#if TIME_STAMP
extern time_stamp_t time_stamp;
-#else TIME_STAMP
+#else /* TIME_STAMP */
typedef unsigned int time_stamp_t;
#define time_stamp 0
-#endif TIME_STAMP
+#endif /* TIME_STAMP */
#define LOCK_INFO_MAX (1024*32)
#define LOCK_INFO_HASH_COUNT 1024
@@ -74,7 +74,7 @@ struct lock_info {
unsigned int success;
unsigned int fail;
unsigned int masked;
- unsigned int stack;
+ unsigned int stack;
time_stamp_t time;
decl_simple_lock_data(, *lock)
vm_offset_t caller;
@@ -113,7 +113,7 @@ decl_simple_lock_data(, **lock)
li = &default_lock_info;
return(li);
}
-
+
simple_lock(lock)
decl_simple_lock_data(, *lock)
@@ -121,7 +121,7 @@ decl_simple_lock_data(, *lock)
register struct lock_info *li = locate_lock_info(&lock);
register my_cpu = cpu_number();
- if (current_thread())
+ if (current_thread())
li->stack = current_thread()->lock_stack++;
if (curr_ipl[my_cpu])
li->masked++;
@@ -252,8 +252,8 @@ lock_info_sort(arg, abs, count)
old_val = max_val;
}
db_printf("\n%d total locks, %d empty buckets", total, empty );
- if (default_lock_info.success)
- db_printf(", default: %d", default_lock_info.success + default_lock_info.fail);
+ if (default_lock_info.success)
+ db_printf(", default: %d", default_lock_info.success + default_lock_info.fail);
db_printf("\n");
print_lock_info(&mean);
}
@@ -271,7 +271,7 @@ lock_info_clear()
bzero(li, sizeof(struct lock_info));
}
}
- bzero(&default_lock_info, sizeof(struct lock_info));
+ bzero(&default_lock_info, sizeof(struct lock_info));
}
print_lock_info(li)
@@ -294,7 +294,7 @@ struct lock_info *li;
db_printf("\n");
}
-#endif NCPUS > 1 && MACH_LOCK_MON
+#endif /* NCPUS > 1 && MACH_LOCK_MON */
#if TIME_STAMP
@@ -327,9 +327,9 @@ time_lock(loops)
}
stamp = time_stamp - stamp;
db_printf("%d stamps for _simple_locks\n", stamp/loops);
-#endif MACH_LOCK_MON
+#endif /* MACH_LOCK_MON */
}
-#endif TIME_STAMP
+#endif /* TIME_STAMP */
#if MACH_MP_DEBUG
@@ -369,7 +369,4 @@ retry_bit_lock(index, addr)
count = 0;
}
}
-#endif MACH_MP_DEBUG
-
-
-
+#endif /* MACH_MP_DEBUG */
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index ee9896a..bfa6620 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -141,7 +141,7 @@ void clock_interrupt(usec, usermode, basepri)
else {
timer_bump(&thread->system_timer, usec);
}
-#endif STAT_TIME
+#endif /* STAT_TIME */
/*
* Increment the CPU time statistics.
@@ -193,7 +193,7 @@ void clock_interrupt(usec, usermode, basepri)
* Increment the tick count for the timestamping routine.
*/
ts_tick_count++;
-#endif TS_FORMAT == 1
+#endif /* TS_FORMAT == 1 */
/*
* Update the tick count since bootup, and handle
@@ -420,7 +420,7 @@ host_set_time(host, new_time)
thread_bind(current_thread(), master_processor);
if (current_processor() != master_processor)
thread_block((void (*)) 0);
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
s = splhigh();
time = new_time;
@@ -433,7 +433,7 @@ host_set_time(host, new_time)
* Switch off the master CPU.
*/
thread_bind(current_thread(), PROCESSOR_NULL);
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
return (KERN_SUCCESS);
}
@@ -461,7 +461,7 @@ host_adjust_time(host, new_adjustment, old_adjustment)
thread_bind(current_thread(), master_processor);
if (current_processor() != master_processor)
thread_block((void (*)) 0);
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
s = splclock();
@@ -482,7 +482,7 @@ host_adjust_time(host, new_adjustment, old_adjustment)
splx(s);
#if NCPUS > 1
thread_bind(current_thread(), PROCESSOR_NULL);
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
*old_adjustment = oadj;
diff --git a/kern/mach_factor.c b/kern/mach_factor.c
index 1a17213..34a7d0c 100644
--- a/kern/mach_factor.c
+++ b/kern/mach_factor.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -41,7 +41,7 @@
#if MACH_KERNEL
#include <mach/kern_return.h>
#include <mach/port.h>
-#endif MACH_KERNEL
+#endif /* MACH_KERNEL */
long avenrun[3] = {0, 0, 0};
@@ -92,7 +92,7 @@ void compute_mach_factor()
/*
* account for threads on cpus.
*/
- nthreads += ncpus - pset->idle_count;
+ nthreads += ncpus - pset->idle_count;
/*
* The current thread (running this calculation)
diff --git a/kern/mach_param.h b/kern/mach_param.h
index 5fc2063..10376d8 100644
--- a/kern/mach_param.h
+++ b/kern/mach_param.h
@@ -64,4 +64,4 @@
#define IMAR_MAX (1 << 10) /* Max number of msg-accepted reqs */
-#endif _KERN_MACH_PARAM_H_
+#endif /* _KERN_MACH_PARAM_H_ */
diff --git a/kern/machine.c b/kern/machine.c
index fef541e..67bcbbb 100644
--- a/kern/machine.c
+++ b/kern/machine.c
@@ -730,7 +730,7 @@ boolean_t wait;
{
#ifdef lint
processor++; new_pset++; wait++;
-#endif lint
+#endif /* lint */
return(KERN_FAILURE);
}
diff --git a/kern/processor.c b/kern/processor.c
index ad788a9..6066ecf 100644
--- a/kern/processor.c
+++ b/kern/processor.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1993-1988 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -329,7 +329,7 @@ void thread_change_psets(
queue_enter(&new_pset->threads, thread, thread_t, pset_threads);
thread->processor_set = new_pset;
new_pset->thread_count++;
-}
+}
/*
* pset_deallocate:
@@ -362,7 +362,7 @@ void pset_deallocate(
*/
pset->ref_count = 1;
pset_ref_unlock(pset);
-
+
simple_lock(&all_psets_lock);
pset_ref_lock(pset);
if (--pset->ref_count > 0) {
@@ -440,7 +440,7 @@ processor_info(
else
basic_info->running = TRUE;
basic_info->slot_num = slot_num;
- if (processor == master_processor)
+ if (processor == master_processor)
basic_info->is_master = TRUE;
else
basic_info->is_master = FALSE;
@@ -613,7 +613,7 @@ kern_return_t processor_set_destroy(
pset_lock(pset);
}
}
-
+
if (pset->processor_count > 0) {
list = &pset->processors;
while(!queue_empty(list)) {
@@ -639,7 +639,7 @@ kern_return_t processor_set_destroy(
}
#else /* MACH_HOST */
-
+
kern_return_t
processor_set_create(
host_t host,
@@ -661,7 +661,7 @@ kern_return_t processor_set_destroy(
return KERN_FAILURE;
}
-#endif MACH_HOST
+#endif /* MACH_HOST */
kern_return_t
processor_get_assignment(
diff --git a/kern/profile.c b/kern/profile.c
index 7513934..e14d411 100644
--- a/kern/profile.c
+++ b/kern/profile.c
@@ -31,7 +31,7 @@
* Grenoble, FRANCE
*
* All Rights Reserved
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
@@ -40,7 +40,7 @@
* Foundation not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission.
- *
+ *
* OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
@@ -63,7 +63,7 @@ extern vm_map_t kernel_map; /* can be discarded, defined in <vm/vm_kern.h> */
thread_t profile_thread_id = THREAD_NULL;
-void profile_thread()
+void profile_thread()
{
struct message {
mach_msg_header_t head;
@@ -84,11 +84,11 @@ void profile_thread()
/* Template initialisation of header and type structures */
msg.head.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE);
- msg.head.msgh_size = sizeof(msg);
+ msg.head.msgh_size = sizeof(msg);
msg.head.msgh_local_port = MACH_PORT_NULL;
msg.head.msgh_kind = MACH_MSGH_KIND_NORMAL;
msg.head.msgh_id = 666666;
-
+
msg.type.msgt_name = MACH_MSG_TYPE_INTEGER_32;
msg.type.msgt_size = 32;
msg.type.msgt_number = SIZE_PROF_BUFFER+1;
@@ -105,7 +105,7 @@ void profile_thread()
splx(s);
if ((buf_entry = (buf_to_send_t) prof_queue_entry) == NULLBTS)
- {
+ {
thread_sleep((event_t) profile_thread, lock, TRUE);
if (current_thread()->wait_result != THREAD_AWAKENED)
break;
@@ -118,30 +118,30 @@ void profile_thread()
int imax;
curr_th = (thread_t) buf_entry->thread;
- curr_buf = (int) buf_entry->number;
+ curr_buf = (int) buf_entry->number;
pbuf = curr_th->profil_buffer;
/* Set the remote port */
msg.head.msgh_remote_port = (mach_port_t) pbuf->prof_port;
-
+
sample = pbuf->prof_area[curr_buf].p_zone;
imax = pbuf->prof_area[curr_buf].p_index;
for(j=0 ;j<imax; j++,sample++)
- msg.arg[j] = *sample;
+ msg.arg[j] = *sample;
/* Let hardclock() know you've finished the dirty job */
pbuf->prof_area[curr_buf].p_full = FALSE;
/*
- * Store the number of samples actually sent
+ * Store the number of samples actually sent
* as the last element of the array.
*/
msg.arg[SIZE_PROF_BUFFER] = imax;
- mr = mach_msg(&(msg.head), MACH_SEND_MSG,
- sizeof(struct message), 0,
- MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,
+ mr = mach_msg(&(msg.head), MACH_SEND_MSG,
+ sizeof(struct message), 0,
+ MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,
MACH_PORT_NULL);
if (mr != MACH_MSG_SUCCESS) {
@@ -192,10 +192,10 @@ thread_t th;
/* Ask for the sending of the last PC buffer.
* Make a request to the profile_thread by inserting
- * the buffer in the send queue, and wake it up.
+ * the buffer in the send queue, and wake it up.
* The last buffer must be inserted at the head of the
- * send queue, so the profile_thread handles it immediatly.
- */
+ * send queue, so the profile_thread handles it immediatly.
+ */
if (kmem_alloc( kernel_map, &vm_buf_entry,
sizeof(struct buf_to_send)) != KERN_SUCCESS)
return;
@@ -212,7 +212,7 @@ thread_t th;
mpenqueue_tail( &prof_queue, &(buf_entry->list));
thread_wakeup((event_t) profile_thread);
assert_wait((event_t) &buf_entry->wakeme, TRUE);
- splx(s);
+ splx(s);
thread_block((void (*)()) 0);
} else {
splx(s);
@@ -228,26 +228,26 @@ profile(pc) {
/* Find out which thread has been interrupted. */
thread_t it_thread = current_thread();
- int inout_val = pc;
+ int inout_val = pc;
buf_to_send_t buf_entry;
vm_offset_t vm_buf_entry;
int *val;
/*
- * Test if the current thread is to be sampled
+ * Test if the current thread is to be sampled
*/
if (it_thread->thread_profiled) {
/* Inserts the PC value in the buffer of the thread */
- set_pbuf_value(it_thread->profil_buffer, &inout_val);
+ set_pbuf_value(it_thread->profil_buffer, &inout_val);
switch(inout_val) {
- case 0:
+ case 0:
if (profile_thread_id == THREAD_NULL) {
reset_pbuf_area(it_thread->profil_buffer);
} else printf("ERROR : hardclock : full buffer unsent\n");
break;
- case 1:
+ case 1:
/* Normal case, value successfully inserted */
break;
- case 2 :
+ case 2 :
/*
* The value we have just inserted caused the
* buffer to be full, and ready to be sent.
@@ -279,8 +279,8 @@ profile(pc) {
thread_wakeup((event_t) profile_thread);
break;
- default:
- printf("ERROR: profile : unexpected case\n");
+ default:
+ printf("ERROR: profile : unexpected case\n");
}
}
}
@@ -295,12 +295,12 @@ ipc_space_t task;
ipc_object_t reply;
thread_t cur_thread;
{
-/*
+/*
* This routine is called every time that a new thread has made
- * a request for the sampling service. We must keep track of the
+ * a request for the sampling service. We must keep track of the
* correspondance between it's identity (cur_thread) and the port
- * we are going to use as a reply port to send out the samples resulting
- * from its execution.
+ * we are going to use as a reply port to send out the samples resulting
+ * from its execution.
*/
prof_data_t pbuf;
vm_offset_t vmpbuf;
@@ -341,7 +341,7 @@ printf("ERROR:mach_sample_thread:cannot set pbuf_nb\n");
cur_thread->thread_profiled_own = FALSE;
cur_thread->thread_profiled = FALSE;
- dealloc_pbuf_area(cur_thread->profil_buffer);
+ dealloc_pbuf_area(cur_thread->profil_buffer);
cur_thread->profil_buffer = NULLPBUF;
}
@@ -385,8 +385,8 @@ task_t cur_task;
if (turnon && profile_thread_id == THREAD_NULL)
profile_thread_id =
kernel_thread(current_task(), profile_thread);
- cur_task->task_profiled = turnon;
- actual = cur_task->thread_count;
+ cur_task->task_profiled = turnon;
+ actual = cur_task->thread_count;
sentone = 0;
for (i=0, thread=(thread_t) queue_first(&cur_task->thread_list);
i < actual;
@@ -402,7 +402,7 @@ task_t cur_task;
}
}
if (!turnon) {
- dealloc_pbuf_area(pbuf);
+ dealloc_pbuf_area(pbuf);
cur_task->profil_buffer = NULLPBUF;
}
}
@@ -410,4 +410,4 @@ task_t cur_task;
return KERN_SUCCESS;
}
-#endif 0
+#endif /* 0 */
diff --git a/kern/queue.h b/kern/queue.h
index 2f8f792..3481db3 100644
--- a/kern/queue.h
+++ b/kern/queue.h
@@ -1,18 +1,18 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
@@ -366,4 +366,4 @@ typedef struct mpqueue_head mpqueue_head_t;
* Old queue stuff, will go away soon.
*/
-#endif _KERN_QUEUE_H_
+#endif /* _KERN_QUEUE_H_ */
diff --git a/kern/sched.h b/kern/sched.h
index 756384b..6616e0f 100644
--- a/kern/sched.h
+++ b/kern/sched.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -46,7 +46,7 @@
#if MACH_FIXPRI
#include <mach/policy.h>
-#endif MACH_FIXPRI
+#endif /* MACH_FIXPRI */
#if STAT_TIME
@@ -56,14 +56,14 @@
*/
#define PRI_SHIFT 18
-#else STAT_TIME
+#else /* STAT_TIME */
/*
* Otherwise machine provides shift(s) based on time units it uses.
*/
#include <machine/sched_param.h>
-#endif STAT_TIME
+#endif /* STAT_TIME */
#define NRQS 32 /* 32 run queues per cpu */
struct run_queue {
@@ -98,14 +98,14 @@ typedef struct run_queue *run_queue_t;
((processor)->processor_set->runq.low < \
(thread)->sched_pri))))
-#else MACH_FIXPRI
+#else /* MACH_FIXPRI */
#define csw_needed(thread, processor) ((thread)->state & TH_SUSP || \
((processor)->runq.count > 0) || \
((processor)->first_quantum == FALSE && \
((processor)->processor_set->runq.count > 0 && \
(processor)->processor_set->runq.low <= \
((thread)->sched_pri))))
-#endif MACH_FIXPRI
+#endif /* MACH_FIXPRI */
/*
* Scheduler routines.
@@ -176,6 +176,6 @@ MACRO_END
*/
extern int sched_usec;
-#endif SIMPLE_CLOCK
+#endif /* SIMPLE_CLOCK */
-#endif _KERN_SCHED_H_
+#endif /* _KERN_SCHED_H_ */
diff --git a/kern/startup.c b/kern/startup.c
index 0e1c701..5a2171e 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -78,7 +78,7 @@ void start_kernel_threads(); /* forward */
#if NCPUS > 1
extern void start_other_cpus();
extern void action_thread();
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
/* XX */
extern vm_offset_t phys_first_addr, phys_last_addr;
@@ -113,7 +113,7 @@ void setup_main()
#if XPR_DEBUG
xprbootstrap();
-#endif XPR_DEBUG
+#endif /* XPR_DEBUG */
timestamp_init();
@@ -135,7 +135,7 @@ void setup_main()
swapper_init();
#if MACH_HOST
pset_sys_init();
-#endif MACH_HOST
+#endif /* MACH_HOST */
/*
* Kick off the time-out driven routines by calling
@@ -218,7 +218,7 @@ void start_kernel_threads()
* Allow other CPUs to run.
*/
start_other_cpus();
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
/*
* Create the device service.
@@ -230,14 +230,14 @@ void start_kernel_threads()
*/
#if NORMA_IPC
norma_ipc_init();
-#endif NORMA_IPC
+#endif /* NORMA_IPC */
/*
* Initialize NORMA vm system.
*/
#if NORMA_VM
norma_vm_init();
-#endif NORMA_VM
+#endif /* NORMA_VM */
/*
@@ -256,7 +256,7 @@ void start_kernel_threads()
#if XPR_DEBUG
xprinit(); /* XXX */
-#endif XPR_DEBUG
+#endif /* XPR_DEBUG */
/*
* Become the pageout daemon.
@@ -271,7 +271,7 @@ void slave_main()
{
cpu_launch_first_thread(THREAD_NULL);
}
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
/*
* Start up the first thread on a CPU.
diff --git a/kern/syscall_emulation.h b/kern/syscall_emulation.h
index 91b3ed7..5ebe2e1 100644
--- a/kern/syscall_emulation.h
+++ b/kern/syscall_emulation.h
@@ -56,6 +56,6 @@ typedef vm_offset_t *emulation_vector_t; /* Variable-length array */
#define EML_MOD (err_kern|err_sub(2))
#define EML_BAD_TASK (EML_MOD|0x0001)
#define EML_BAD_CNT (EML_MOD|0x0002)
-#endif ASSEMBLER
+#endif /* ASSEMBLER */
-#endif _KERN_SYSCALL_EMULATION_H_
+#endif /* _KERN_SYSCALL_EMULATION_H_ */
diff --git a/kern/syscall_subr.c b/kern/syscall_subr.c
index a040d71..8c5b38a 100644
--- a/kern/syscall_subr.c
+++ b/kern/syscall_subr.c
@@ -47,7 +47,7 @@
#if MACH_FIXPRI
#include <mach/policy.h>
-#endif MACH_FIXPRI
+#endif /* MACH_FIXPRI */
@@ -91,7 +91,7 @@ boolean_t swtch()
if (myprocessor->runq.count == 0 &&
myprocessor->processor_set->runq.count == 0)
return(FALSE);
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
counter(c_swtch_block++);
thread_block(swtch_continue);
@@ -125,14 +125,14 @@ boolean_t swtch_pri(pri)
#ifdef lint
pri++;
-#endif lint
+#endif /* lint */
#if NCPUS > 1
myprocessor = current_processor();
if (myprocessor->runq.count == 0 &&
myprocessor->processor_set->runq.count == 0)
return(FALSE);
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
/*
* XXX need to think about depression duration.
@@ -158,7 +158,7 @@ void thread_switch_continue()
register thread_t cur_thread = current_thread();
/*
- * Restore depressed priority
+ * Restore depressed priority
*/
if (cur_thread->depress_priority >= 0)
(void) thread_depress_abort(cur_thread);
@@ -210,7 +210,7 @@ mach_msg_timeout_t option_time;
default:
return(KERN_INVALID_ARGUMENT);
}
-
+
#ifndef MIGRATING_THREADS /* XXX thread_run defunct */
/*
* Check and act on thread hint if appropriate.
@@ -250,11 +250,11 @@ mach_msg_timeout_t option_time;
myprocessor->quantum = thread->sched_data;
myprocessor->first_quantum = TRUE;
}
-#endif MACH_FIXPRI
+#endif /* MACH_FIXPRI */
counter(c_thread_switch_handoff++);
thread_run(thread_switch_continue, thread);
/*
- * Restore depressed priority
+ * Restore depressed priority
*/
if (cur_thread->depress_priority >= 0)
(void) thread_depress_abort(cur_thread);
@@ -280,14 +280,14 @@ mach_msg_timeout_t option_time;
myprocessor = current_processor();
if (myprocessor->processor_set->runq.count > 0 ||
myprocessor->runq.count > 0)
-#endif NCPUS > 1
+#endif /* NCPUS > 1 */
{
counter(c_thread_switch_block++);
thread_block(thread_switch_continue);
}
/*
- * Restore depressed priority
+ * Restore depressed priority
*/
if (cur_thread->depress_priority >= 0)
(void) thread_depress_abort(cur_thread);
@@ -335,7 +335,7 @@ mach_msg_timeout_t depress_time;
thread_unlock(thread);
(void) splx(s);
-}
+}
/*
* thread_depress_timeout:
diff --git a/kern/syscall_subr.h b/kern/syscall_subr.h
index 921c2b2..8790d73 100644
--- a/kern/syscall_subr.h
+++ b/kern/syscall_subr.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -32,4 +32,4 @@ extern int swtch_pri();
extern int thread_switch();
extern void thread_depress_timeout();
-#endif _KERN_SYSCALL_SUBR_H_
+#endif /* _KERN_SYSCALL_SUBR_H_ */
diff --git a/kern/syscall_sw.c b/kern/syscall_sw.c
index 41c8b2f..0759065 100644
--- a/kern/syscall_sw.c
+++ b/kern/syscall_sw.c
@@ -96,7 +96,7 @@ extern kern_return_t syscall_device_writev_request();
#ifdef FIPC
extern kern_return_t syscall_fipc_send();
extern kern_return_t syscall_fipc_recv();
-#endif FIPC
+#endif /* FIPC */
mach_trap_t mach_trap_table[] = {
MACH_TRAP(kern_invalid, 0), /* 0 */ /* Unix */
@@ -247,7 +247,7 @@ mach_trap_t mach_trap_table[] = {
#else
MACH_TRAP(kern_invalid, 0), /* 96 */
MACH_TRAP(kern_invalid, 0), /* 97 */
-#endif FIPC
+#endif /* FIPC */
MACH_TRAP(kern_invalid, 0), /* 98 */
MACH_TRAP(kern_invalid, 0), /* 99 */
diff --git a/kern/syscall_sw.h b/kern/syscall_sw.h
index 6a21ff5..87fc1bb 100644
--- a/kern/syscall_sw.h
+++ b/kern/syscall_sw.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -48,4 +48,4 @@ extern int mach_trap_count;
#define MACH_TRAP_STACK(name, arg_count) \
{ (arg_count), (int (*)()) (name), TRUE, 0 }
-#endif _KERN_SYSCALL_SW_H_
+#endif /* _KERN_SYSCALL_SW_H_ */
diff --git a/kern/task.h b/kern/task.h
index ec80058..df6560c 100644
--- a/kern/task.h
+++ b/kern/task.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1993-1988 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -109,7 +109,7 @@ struct task {
#endif /* NORMA_TASK */
#if FAST_TAS
-#define TASK_FAST_TAS_NRAS 8
+#define TASK_FAST_TAS_NRAS 8
vm_offset_t fast_tas_base[TASK_FAST_TAS_NRAS];
vm_offset_t fast_tas_end[TASK_FAST_TAS_NRAS];
#endif /* FAST_TAS */
@@ -182,4 +182,4 @@ extern task_t kernel_task_create();
extern task_t kernel_task;
-#endif _KERN_TASK_H_
+#endif /* _KERN_TASK_H_ */
diff --git a/kern/thread_swap.h b/kern/thread_swap.h
index e390ac4..c08f39f 100644
--- a/kern/thread_swap.h
+++ b/kern/thread_swap.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -41,4 +41,4 @@ extern void thread_doswapin( /* thread_t thread */ );
extern void swapin_thread();
extern void thread_swapout( /* thread_t thread */ );
-#endif _KERN_THREAD_SWAP_H_
+#endif /* _KERN_THREAD_SWAP_H_ */
diff --git a/kern/time_out.h b/kern/time_out.h
index c03f4c6..4907e5b 100644
--- a/kern/time_out.h
+++ b/kern/time_out.h
@@ -84,4 +84,4 @@ extern boolean_t untimeout();
reset_timeout((t)); \
MACRO_END
-#endif _KERN_TIME_OUT_H_
+#endif /* _KERN_TIME_OUT_H_ */
diff --git a/kern/time_stamp.c b/kern/time_stamp.c
index 6e22155..fdb02fc 100644
--- a/kern/time_stamp.c
+++ b/kern/time_stamp.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -33,7 +33,7 @@
*/
#ifdef multimax
#include <mmax/timer.h>
-#endif multimax
+#endif /* multimax */
@@ -45,14 +45,14 @@ struct tsval *tsp;
struct tsval temp;
temp.low_val = FRcounter;
temp.high_val = 0;
-#else multimax
+#else /* multimax */
/*
temp.low_val = 0;
temp.high_val = ts_tick_count;
*/
time_value_t temp;
temp = time;
-#endif multimax
+#endif /* multimax */
if (copyout((char *)&temp,
(char *)tsp,
@@ -68,7 +68,7 @@ struct tsval *tsp;
void timestamp_init()
{
#ifdef multimax
-#else multimax
+#else /* multimax */
ts_tick_count = 0;
-#endif multimax
+#endif /* multimax */
}
diff --git a/kern/time_stamp.h b/kern/time_stamp.h
index 81711f6..480d2f1 100644
--- a/kern/time_stamp.h
+++ b/kern/time_stamp.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -51,10 +51,10 @@ struct tsval {
*/
#define TS_FORMAT 1
-#if KERNEL
+#if KERNEL
unsigned ts_tick_count;
-#endif KERNEL
-#endif TS_FORMAT
+#endif /* KERNEL */
+#endif /* TS_FORMAT */
/*
* List of all format definitions for convert_ts_to_tv.
@@ -62,4 +62,4 @@ unsigned ts_tick_count;
#define TS_FORMAT_DEFAULT 1
#define TS_FORMAT_MMAX 2
-#endif _KERN_TIME_STAMP_H_
+#endif /* _KERN_TIME_STAMP_H_ */
diff --git a/kern/timer.c b/kern/timer.c
index 57772ee..326d340 100644
--- a/kern/timer.c
+++ b/kern/timer.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -82,7 +82,7 @@ timer_t this_timer;
}
#if STAT_TIME
-#else STAT_TIME
+#else /* STAT_TIME */
#ifdef MACHINE_TIMER_ROUTINES
@@ -126,7 +126,7 @@ unsigned ts;
elapsed = ts - mytimer->tstamp;
#ifdef TIMER_MAX
if (elapsed < 0) elapsed += TIMER_MAX;
-#endif TIMER_MAX
+#endif /* TIMER_MAX */
/*
* Update current timer.
@@ -167,7 +167,7 @@ time_trap_uexit(ts)
elapsed = ts - mytimer->tstamp;
#ifdef TIMER_MAX
if (elapsed < 0) elapsed += TIMER_MAX;
-#endif TIMER_MAX
+#endif /* TIMER_MAX */
/*
* Update current timer.
@@ -214,7 +214,7 @@ timer_t new_timer;
elapsed = ts - mytimer->tstamp;
#ifdef TIMER_MAX
if (elapsed < 0) elapsed += TIMER_MAX;
-#endif TIMER_MAX
+#endif /* TIMER_MAX */
/*
* Update current timer.
@@ -254,7 +254,7 @@ timer_t old_timer;
elapsed = ts - mytimer->tstamp;
#ifdef TIMER_MAX
if (elapsed < 0) elapsed += TIMER_MAX;
-#endif TIMER_MAX
+#endif /* TIMER_MAX */
/*
* Update current timer.
@@ -302,7 +302,7 @@ timer_t new_timer;
elapsed = ts - mytimer->tstamp;
#ifdef TIMER_MAX
if (elapsed < 0) elapsed += TIMER_MAX;
-#endif TIMER_MAX
+#endif /* TIMER_MAX */
/*
* Update current timer.
@@ -325,7 +325,7 @@ timer_t new_timer;
}
#endif /* MACHINE_TIMER_ROUTINES */
-#endif STAT_TIME
+#endif /* STAT_TIME */
/*
* timer_normalize normalizes the value of a timer. It is
@@ -355,7 +355,7 @@ timer_t timer;
*
* Critical scheduling code uses TIMER_DELTA macro in timer.h
* (called from thread_timer_delta in sched.h).
- *
+ *
* Keep coherent with db_time_grab below.
*/
@@ -382,7 +382,7 @@ timer_save_t save;
#if MACH_ASSERT
passes++;
assert((passes < 10000) ? (1) : ((timer->high_bits_check = save->high), 0));
-#endif
+#endif
} while ( (save)->high != (timer)->high_bits_check);
}
@@ -425,7 +425,7 @@ time_value_t *tv;
*/
#ifdef TIMER_ADJUST
TIMER_ADJUST(&temp);
-#endif TIMER_ADJUST
+#endif /* TIMER_ADJUST */
tv->seconds = temp.high + temp.low/1000000;
tv->microseconds = temp.low%1000000;
@@ -452,7 +452,7 @@ void thread_read_times(thread, user_time_p, system_time_p)
#ifdef TIMER_ADJUST
TIMER_ADJUST(&temp);
-#endif TIMER_ADJUST
+#endif /* TIMER_ADJUST */
user_time_p->seconds = temp.high + temp.low/1000000;
user_time_p->microseconds = temp.low % 1000000;
@@ -461,7 +461,7 @@ void thread_read_times(thread, user_time_p, system_time_p)
#ifdef TIMER_ADJUST
TIMER_ADJUST(&temp);
-#endif TIMER_ADJUST
+#endif /* TIMER_ADJUST */
system_time_p->seconds = temp.high + temp.low/1000000;
system_time_p->microseconds = temp.low % 1000000;
}
@@ -486,7 +486,7 @@ void db_thread_read_times(thread, user_time_p, system_time_p)
#ifdef TIMER_ADJUST
TIMER_ADJUST(&temp);
-#endif TIMER_ADJUST
+#endif /* TIMER_ADJUST */
user_time_p->seconds = temp.high + temp.low/1000000;
user_time_p->microseconds = temp.low % 1000000;
@@ -495,7 +495,7 @@ void db_thread_read_times(thread, user_time_p, system_time_p)
#ifdef TIMER_ADJUST
TIMER_ADJUST(&temp);
-#endif TIMER_ADJUST
+#endif /* TIMER_ADJUST */
system_time_p->seconds = temp.high + temp.low/1000000;
system_time_p->microseconds = temp.low % 1000000;
}
diff --git a/kern/timer.h b/kern/timer.h
index fe60e26..4573936 100644
--- a/kern/timer.h
+++ b/kern/timer.h
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -43,14 +43,14 @@
#define TIMER_HIGH_UNIT TIMER_RATE
#undef TIMER_ADJUST
-#else STAT_TIME
+#else /* STAT_TIME */
/*
* Machine dependent definitions based on hardware support.
*/
#include <machine/timer.h>
-#endif STAT_TIME
+#endif /* STAT_TIME */
/*
* Definitions for accurate timers. high_bits_check is a copy of
@@ -99,10 +99,10 @@ typedef struct timer_save timer_save_data_t, *timer_save_t;
#if STAT_TIME
#define start_timer(timer)
#define timer_switch(timer)
-#else STAT_TIME
+#else /* STAT_TIME */
extern void start_timer();
extern void timer_switch();
-#endif STAT_TIME
+#endif /* STAT_TIME */
extern void timer_read();
extern void thread_read_times();
@@ -111,7 +111,7 @@ extern unsigned timer_delta();
#if STAT_TIME
/*
* Macro to bump timer values.
- */
+ */
#define timer_bump(timer, usec) \
MACRO_BEGIN \
(timer)->low_bits += usec; \
@@ -120,7 +120,7 @@ MACRO_BEGIN \
} \
MACRO_END
-#else STAT_TIME
+#else /* STAT_TIME */
/*
* Exported hardware interface to timers
*/
@@ -128,7 +128,7 @@ extern void time_trap_uentry();
extern void time_trap_uexit();
extern timer_t time_int_entry();
extern void time_int_exit();
-#endif STAT_TIME
+#endif /* STAT_TIME */
/*
* TIMER_DELTA finds the difference between a timer and a saved value,
@@ -154,4 +154,4 @@ MACRO_BEGIN \
} \
MACRO_END
-#endif _KERN_TIMER_H_
+#endif /* _KERN_TIMER_H_ */
diff --git a/kern/xpr.c b/kern/xpr.c
index eb8d6be..872ab8d 100644
--- a/kern/xpr.c
+++ b/kern/xpr.c
@@ -1,25 +1,25 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
@@ -189,4 +189,4 @@ void xpr_dump(base, nbufs)
(void) splx(s);
}
}
-#endif MACH_KDB
+#endif /* MACH_KDB */
diff --git a/kern/xpr.h b/kern/xpr.h
index 5a95555..29a6005 100644
--- a/kern/xpr.h
+++ b/kern/xpr.h
@@ -1,34 +1,34 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
- * Include file for xpr circular buffer silent tracing.
+ * Include file for xpr circular buffer silent tracing.
*
*/
/*
- * If the kernel flag XPRDEBUG is set, the XPR macro is enabled. The
+ * If the kernel flag XPRDEBUG is set, the XPR macro is enabled. The
* macro should be invoked something like the following:
* XPR(XPR_SYSCALLS, ("syscall: %d, 0x%x\n", syscallno, arg1);
* which will expand into the following code:
@@ -41,7 +41,7 @@
* of the kernel can easily be reconstructed in a post-processor which
* performs the printf processing.
*
- * If the XPRDEBUG compilation switch is not set, the XPR macro expands
+ * If the XPRDEBUG compilation switch is not set, the XPR macro expands
* to nothing.
*/
@@ -50,9 +50,9 @@
#ifdef KERNEL
#include <xpr_debug.h>
-#else KERNEL
+#else /* KERNEL */
#include <sys/features.h>
-#endif KERNEL
+#endif /* KERNEL */
#include <machine/xpr.h>
@@ -80,9 +80,9 @@ extern int xprflags;
#define XPR_INODE_PAGER (1 << 14)
#define XPR_INODE_PAGER_DATA (1 << 15)
-#else XPR_DEBUG
+#else /* XPR_DEBUG */
#define XPR(flags,xprargs)
-#endif XPR_DEBUG
+#endif /* XPR_DEBUG */
struct xprbuf {
char *msg;
@@ -98,4 +98,4 @@ extern void xpr_dump();
extern void xprinit();
extern void xprbootstrap();
-#endif _KERN_XPR_H_
+#endif /* _KERN_XPR_H_ */
diff --git a/kern/zalloc.c b/kern/zalloc.c
index 41f638e..0e62b01 100644
--- a/kern/zalloc.c
+++ b/kern/zalloc.c
@@ -972,4 +972,4 @@ kern_return_t host_zone_info(host, namesp, namesCntp, infop, infoCntp)
return KERN_SUCCESS;
}
-#endif MACH_DEBUG
+#endif /* MACH_DEBUG */
diff --git a/kern/zalloc.h b/kern/zalloc.h
index 2e9b4b3..9e44a6d 100644
--- a/kern/zalloc.h
+++ b/kern/zalloc.h
@@ -132,4 +132,4 @@ static __inline void ZFREE(zone_t zone, vm_offset_t element)
-#endif _KERN_ZALLOC_H_
+#endif /* _KERN_ZALLOC_H_ */