summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rw-r--r--kern/act.c23
-rw-r--r--kern/exception.c42
-rw-r--r--kern/ipc_mig.c128
-rw-r--r--kern/ipc_tt.c54
-rw-r--r--kern/lock_mon.c1
-rw-r--r--kern/mach_clock.c25
-rw-r--r--kern/machine.c48
-rw-r--r--kern/printf.c6
-rw-r--r--kern/priority.c10
-rw-r--r--kern/startup.c3
-rw-r--r--kern/syscall_emulation.c46
-rw-r--r--kern/syscall_subr.c25
-rw-r--r--kern/thread_swap.c6
-rw-r--r--kern/time_stamp.c3
-rw-r--r--kern/timer.c67
-rw-r--r--kern/xpr.c16
16 files changed, 234 insertions, 269 deletions
diff --git a/kern/act.c b/kern/act.c
index b8ad602..3186f7e 100644
--- a/kern/act.c
+++ b/kern/act.c
@@ -1013,11 +1013,11 @@ act_set_special_port(Act *act, int which, ipc_port_t port)
* Return thread's machine-dependent state.
*/
kern_return_t
-act_get_state_immediate(act, flavor, old_state, old_state_count)
- Act *act;
- int flavor;
- void *old_state; /* pointer to OUT array */
- unsigned int *old_state_count; /*IN/OUT*/
+act_get_state_immediate(
+ Act *act,
+ int flavor,
+ void *old_state, /* pointer to OUT array */
+ unsigned int *old_state_count) /*IN/OUT*/
{
kern_return_t ret;
@@ -1039,11 +1039,11 @@ act_get_state_immediate(act, flavor, old_state, old_state_count)
* Change thread's machine-dependent state.
*/
kern_return_t
-act_set_state_immediate(act, flavor, new_state, new_state_count)
- Act *act;
- int flavor;
- void *new_state;
- unsigned int new_state_count;
+act_set_state_immediate(
+ Act *act,
+ int flavor,
+ void *new_state,
+ unsigned int new_state_count)
{
kern_return_t ret;
@@ -1097,8 +1097,7 @@ void dump_act(act)
#ifdef ACTWATCH
Act *
-get_next_act(sp)
- int sp;
+get_next_act(int sp)
{
static int i;
Act *act;
diff --git a/kern/exception.c b/kern/exception.c
index 2ca404d..7954fba 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -82,8 +82,10 @@ boolean_t debug_user_with_kdb = FALSE;
*/
void
-exception(_exception, code, subcode)
- integer_t _exception, code, subcode;
+exception(
+ integer_t _exception,
+ integer_t code,
+ integer_t subcode)
{
ipc_thread_t self = current_thread();
ipc_port_t exc_port;
@@ -152,8 +154,10 @@ exception(_exception, code, subcode)
*/
void
-exception_try_task(_exception, code, subcode)
- integer_t _exception, code, subcode;
+exception_try_task(
+ integer_t _exception,
+ integer_t code,
+ integer_t subcode)
{
ipc_thread_t self = current_thread();
task_t task = self->task;
@@ -319,12 +323,13 @@ mach_msg_type_t exc_code_proto = {
int exception_raise_misses = 0;
void
-exception_raise(dest_port, thread_port, task_port,
- _exception, code, subcode)
- ipc_port_t dest_port;
- ipc_port_t thread_port;
- ipc_port_t task_port;
- integer_t _exception, code, subcode;
+exception_raise(
+ ipc_port_t dest_port,
+ ipc_port_t thread_port,
+ ipc_port_t task_port,
+ integer_t _exception,
+ integer_t code,
+ integer_t subcode)
{
ipc_thread_t self = current_thread();
ipc_thread_t receiver;
@@ -783,8 +788,7 @@ mach_msg_type_t exc_RetCode_proto = {
*/
kern_return_t
-exception_parse_reply(kmsg)
- ipc_kmsg_t kmsg;
+exception_parse_reply(ipc_kmsg_t kmsg)
{
mig_reply_header_t *msg =
(mig_reply_header_t *) &kmsg->ikm_header;
@@ -860,10 +864,10 @@ exception_raise_continue(void)
*/
void
-exception_raise_continue_slow(mr, kmsg, seqno)
- mach_msg_return_t mr;
- ipc_kmsg_t kmsg;
- mach_port_seqno_t seqno;
+exception_raise_continue_slow(
+ mach_msg_return_t mr,
+ ipc_kmsg_t kmsg,
+ mach_port_seqno_t seqno)
{
ipc_thread_t self = current_thread();
ipc_port_t reply_port = self->ith_port;
@@ -943,9 +947,9 @@ exception_raise_continue_slow(mr, kmsg, seqno)
*/
void
-exception_raise_continue_fast(reply_port, kmsg)
- ipc_port_t reply_port;
- ipc_kmsg_t kmsg;
+exception_raise_continue_fast(
+ ipc_port_t reply_port,
+ ipc_kmsg_t kmsg)
{
ipc_thread_t self = current_thread();
kern_return_t kr;
diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c
index f2c3f45..41ebc94 100644
--- a/kern/ipc_mig.c
+++ b/kern/ipc_mig.c
@@ -110,8 +110,7 @@ mach_msg_rpc_from_kernel(msg, send_size, reply_size)
*/
void
-mach_msg_abort_rpc(thread)
- ipc_thread_t thread;
+mach_msg_abort_rpc(ipc_thread_t thread)
{
ipc_port_t reply = IP_NULL;
@@ -141,14 +140,14 @@ mach_msg_abort_rpc(thread)
*/
mach_msg_return_t
-mach_msg(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
- mach_msg_header_t *msg;
- mach_msg_option_t option;
- mach_msg_size_t send_size;
- mach_msg_size_t rcv_size;
- mach_port_t rcv_name;
- mach_msg_timeout_t time_out;
- mach_port_t notify;
+mach_msg(
+ mach_msg_header_t *msg,
+ mach_msg_option_t option,
+ mach_msg_size_t send_size,
+ mach_msg_size_t rcv_size,
+ mach_port_t rcv_name,
+ mach_msg_timeout_t time_out,
+ mach_port_t notify)
{
ipc_space_t space = current_space();
vm_map_t map = current_map();
@@ -333,8 +332,7 @@ MACRO_BEGIN \
MACRO_END
device_t
-port_name_to_device(name)
- mach_port_t name;
+port_name_to_device(mach_port_t name)
{
ipc_port_t port;
device_t device;
@@ -377,8 +375,7 @@ port_name_to_device(name)
}
thread_t
-port_name_to_thread(name)
- mach_port_t name;
+port_name_to_thread(mach_port_t name)
{
ipc_port_t port;
@@ -423,8 +420,7 @@ port_name_to_thread(name)
}
task_t
-port_name_to_task(name)
- mach_port_t name;
+port_name_to_task(mach_port_t name)
{
ipc_port_t port;
@@ -519,8 +515,7 @@ port_name_to_map(
}
ipc_space_t
-port_name_to_space(name)
- mach_port_t name;
+port_name_to_space(mach_port_t name)
{
ipc_port_t port;
@@ -575,12 +570,11 @@ port_name_to_space(name)
* AARGH!
*/
-kern_return_t thread_get_state_KERNEL(thread_port, flavor,
- old_state, old_state_count)
- mach_port_t thread_port; /* port right for thread */
- int flavor;
- thread_state_t old_state; /* pointer to OUT array */
- natural_t *old_state_count; /* IN/OUT */
+kern_return_t thread_get_state_KERNEL(
+ mach_port_t thread_port, /* port right for thread */
+ int flavor,
+ thread_state_t old_state, /* pointer to OUT array */
+ natural_t *old_state_count) /* IN/OUT */
{
thread_t thread;
kern_return_t result;
@@ -592,12 +586,11 @@ kern_return_t thread_get_state_KERNEL(thread_port, flavor,
return result;
}
-kern_return_t thread_set_state_KERNEL(thread_port, flavor,
- new_state, new_state_count)
- mach_port_t thread_port; /* port right for thread */
- int flavor;
- thread_state_t new_state;
- natural_t new_state_count;
+kern_return_t thread_set_state_KERNEL(
+ mach_port_t thread_port, /* port right for thread */
+ int flavor,
+ thread_state_t new_state,
+ natural_t new_state_count)
{
thread_t thread;
kern_return_t result;
@@ -669,11 +662,11 @@ syscall_vm_map(
return result;
}
-kern_return_t syscall_vm_allocate(target_map, address, size, anywhere)
- mach_port_t target_map;
- vm_offset_t *address;
- vm_size_t size;
- boolean_t anywhere;
+kern_return_t syscall_vm_allocate(
+ mach_port_t target_map,
+ vm_offset_t *address,
+ vm_size_t size,
+ boolean_t anywhere)
{
vm_map_t map;
vm_offset_t addr;
@@ -692,10 +685,10 @@ kern_return_t syscall_vm_allocate(target_map, address, size, anywhere)
return result;
}
-kern_return_t syscall_vm_deallocate(target_map, start, size)
- mach_port_t target_map;
- vm_offset_t start;
- vm_size_t size;
+kern_return_t syscall_vm_deallocate(
+ mach_port_t target_map,
+ vm_offset_t start,
+ vm_size_t size)
{
vm_map_t map;
kern_return_t result;
@@ -710,10 +703,10 @@ kern_return_t syscall_vm_deallocate(target_map, start, size)
return result;
}
-kern_return_t syscall_task_create(parent_task, inherit_memory, child_task)
- mach_port_t parent_task;
- boolean_t inherit_memory;
- mach_port_t *child_task; /* OUT */
+kern_return_t syscall_task_create(
+ mach_port_t parent_task,
+ boolean_t inherit_memory,
+ mach_port_t *child_task) /* OUT */
{
task_t t, c;
ipc_port_t port;
@@ -739,8 +732,7 @@ kern_return_t syscall_task_create(parent_task, inherit_memory, child_task)
return result;
}
-kern_return_t syscall_task_terminate(task)
- mach_port_t task;
+kern_return_t syscall_task_terminate(mach_port_t task)
{
task_t t;
kern_return_t result;
@@ -755,8 +747,7 @@ kern_return_t syscall_task_terminate(task)
return result;
}
-kern_return_t syscall_task_suspend(task)
- mach_port_t task;
+kern_return_t syscall_task_suspend(mach_port_t task)
{
task_t t;
kern_return_t result;
@@ -771,10 +762,10 @@ kern_return_t syscall_task_suspend(task)
return result;
}
-kern_return_t syscall_task_set_special_port(task, which_port, port_name)
- mach_port_t task;
- int which_port;
- mach_port_t port_name;
+kern_return_t syscall_task_set_special_port(
+ mach_port_t task,
+ int which_port,
+ mach_port_t port_name)
{
task_t t;
ipc_port_t port;
@@ -804,10 +795,10 @@ kern_return_t syscall_task_set_special_port(task, which_port, port_name)
}
kern_return_t
-syscall_mach_port_allocate(task, right, namep)
- mach_port_t task;
- mach_port_right_t right;
- mach_port_t *namep;
+syscall_mach_port_allocate(
+ mach_port_t task,
+ mach_port_right_t right,
+ mach_port_t *namep)
{
ipc_space_t space;
mach_port_t name;
@@ -826,10 +817,10 @@ syscall_mach_port_allocate(task, right, namep)
}
kern_return_t
-syscall_mach_port_allocate_name(task, right, name)
- mach_port_t task;
- mach_port_right_t right;
- mach_port_t name;
+syscall_mach_port_allocate_name(
+ mach_port_t task,
+ mach_port_right_t right,
+ mach_port_t name)
{
ipc_space_t space;
kern_return_t kr;
@@ -845,9 +836,9 @@ syscall_mach_port_allocate_name(task, right, name)
}
kern_return_t
-syscall_mach_port_deallocate(task, name)
- mach_port_t task;
- mach_port_t name;
+syscall_mach_port_deallocate(
+ mach_port_t task,
+ mach_port_t name)
{
ipc_space_t space;
kern_return_t kr;
@@ -863,11 +854,11 @@ syscall_mach_port_deallocate(task, name)
}
kern_return_t
-syscall_mach_port_insert_right(task, name, right, rightType)
- mach_port_t task;
- mach_port_t name;
- mach_port_t right;
- mach_msg_type_name_t rightType;
+syscall_mach_port_insert_right(
+ mach_port_t task,
+ mach_port_t name,
+ mach_port_t right,
+ mach_msg_type_name_t rightType)
{
ipc_space_t space;
ipc_object_t object;
@@ -902,8 +893,7 @@ syscall_mach_port_insert_right(task, name, right, rightType)
return kr;
}
-kern_return_t syscall_thread_depress_abort(thread)
- mach_port_t thread;
+kern_return_t syscall_thread_depress_abort(mach_port_t thread)
{
thread_t t;
kern_return_t result;
diff --git a/kern/ipc_tt.c b/kern/ipc_tt.c
index f8d0f63..96737be 100644
--- a/kern/ipc_tt.c
+++ b/kern/ipc_tt.c
@@ -213,8 +213,7 @@ ipc_task_terminate(
*/
void
-ipc_thread_init(thread)
- thread_t thread;
+ipc_thread_init(thread_t thread)
{
ipc_port_t kport;
@@ -243,8 +242,7 @@ ipc_thread_init(thread)
*/
void
-ipc_thread_enable(thread)
- thread_t thread;
+ipc_thread_enable(thread_t thread)
{
ipc_port_t kport;
@@ -264,8 +262,7 @@ ipc_thread_enable(thread)
*/
void
-ipc_thread_disable(thread)
- thread_t thread;
+ipc_thread_disable(thread_t thread)
{
ipc_port_t kport;
@@ -286,8 +283,7 @@ ipc_thread_disable(thread)
*/
void
-ipc_thread_terminate(thread)
- thread_t thread;
+ipc_thread_terminate(thread_t thread)
{
ipc_port_t kport;
@@ -424,8 +420,7 @@ retrieve_task_self_fast(
*/
ipc_port_t
-retrieve_thread_self_fast(thread)
- thread_t thread;
+retrieve_thread_self_fast(thread_t thread)
{
ipc_port_t port;
@@ -705,10 +700,10 @@ task_set_special_port(
*/
kern_return_t
-thread_get_special_port(thread, which, portp)
- thread_t thread;
- int which;
- ipc_port_t *portp;
+thread_get_special_port(
+ thread_t thread,
+ int which,
+ ipc_port_t *portp)
{
ipc_port_t *whichp;
ipc_port_t port;
@@ -758,10 +753,10 @@ thread_get_special_port(thread, which, portp)
*/
kern_return_t
-thread_set_special_port(thread, which, port)
- thread_t thread;
- int which;
- ipc_port_t port;
+thread_set_special_port(
+ thread_t thread,
+ int which,
+ ipc_port_t port)
{
ipc_port_t *whichp;
ipc_port_t old;
@@ -890,10 +885,10 @@ mach_ports_register(
*/
kern_return_t
-mach_ports_lookup(task, portsp, portsCnt)
- task_t task;
- ipc_port_t **portsp;
- mach_msg_type_number_t *portsCnt;
+mach_ports_lookup(
+ task_t task,
+ ipc_port_t **portsp,
+ mach_msg_type_number_t *portsCnt)
{
vm_offset_t memory;
vm_size_t size;
@@ -1003,8 +998,7 @@ convert_port_to_space(
*/
vm_map_t
-convert_port_to_map(port)
- ipc_port_t port;
+convert_port_to_map(ipc_port_t port)
{
vm_map_t map = VM_MAP_NULL;
@@ -1032,8 +1026,7 @@ convert_port_to_map(port)
*/
thread_t
-convert_port_to_thread(port)
- ipc_port_t port;
+convert_port_to_thread(ipc_port_t port)
{
thread_t thread = THREAD_NULL;
@@ -1061,8 +1054,7 @@ convert_port_to_thread(port)
*/
ipc_port_t
-convert_task_to_port(task)
- task_t task;
+convert_task_to_port(task_t task)
{
ipc_port_t port;
@@ -1088,8 +1080,7 @@ convert_task_to_port(task)
*/
ipc_port_t
-convert_thread_to_port(thread)
- thread_t thread;
+convert_thread_to_port(thread_t thread)
{
ipc_port_t port;
@@ -1113,8 +1104,7 @@ convert_thread_to_port(thread)
*/
void
-space_deallocate(space)
- ipc_space_t space;
+space_deallocate(ipc_space_t space)
{
if (space != IS_NULL)
is_release(space);
diff --git a/kern/lock_mon.c b/kern/lock_mon.c
index 33ce70f..f6bbd5d 100644
--- a/kern/lock_mon.c
+++ b/kern/lock_mon.c
@@ -64,7 +64,6 @@ typedef unsigned int time_stamp_t;
#define LOCK_INFO_HASH_COUNT 1024
#define LOCK_INFO_PER_BUCKET (LOCK_INFO_MAX/LOCK_INFO_HASH_COUNT)
-
#define HASH_LOCK(lock) ((long)lock>>5 & (LOCK_INFO_HASH_COUNT-1))
struct lock_info {
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index f4a7714..0a7458b 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -120,10 +120,10 @@ timer_elt_data_t timer_head; /* ordered list of timeouts */
* the accuracy of the hardware clock.
*
*/
-void clock_interrupt(usec, usermode, basepri)
- int usec; /* microseconds per tick */
- boolean_t usermode; /* executing user code */
- boolean_t basepri; /* at base priority */
+void clock_interrupt(
+ int usec, /* microseconds per tick */
+ boolean_t usermode, /* executing user code */
+ boolean_t basepri) /* at base priority */
{
int my_cpu = cpu_number();
thread_t thread = current_thread();
@@ -309,9 +309,9 @@ void softclock(void)
* telt timer element. Function and param are already set.
* interval time-out interval, in hz.
*/
-void set_timeout(telt, interval)
- timer_elt_t telt; /* already loaded */
- unsigned int interval;
+void set_timeout(
+ timer_elt_t telt, /* already loaded */
+ unsigned int interval)
{
spl_t s;
timer_elt_t next;
@@ -339,8 +339,7 @@ void set_timeout(telt, interval)
splx(s);
}
-boolean_t reset_timeout(telt)
- timer_elt_t telt;
+boolean_t reset_timeout(timer_elt_t telt)
{
spl_t s;
@@ -526,10 +525,10 @@ timer_elt_data_t timeout_timers[NTIMERS];
* param: parameter to pass to function
* interval: timeout interval, in hz.
*/
-void timeout(fcn, param, interval)
- void (*fcn)( void * param );
- void * param;
- int interval;
+void timeout(
+ void (*fcn)(void *param),
+ void * param,
+ int interval)
{
spl_t s;
timer_elt_t elt;
diff --git a/kern/machine.c b/kern/machine.c
index 52133cb..eced768 100644
--- a/kern/machine.c
+++ b/kern/machine.c
@@ -72,8 +72,7 @@ decl_simple_lock_data(,action_lock);
* Flag specified cpu as up and running. Called when a processor comes
* online.
*/
-void cpu_up(cpu)
- int cpu;
+void cpu_up(int cpu)
{
struct machine_slot *ms;
processor_t processor;
@@ -102,8 +101,7 @@ void cpu_up(cpu)
* Flag specified cpu as down. Called when a processor is about to
* go offline.
*/
-void cpu_down(cpu)
- int cpu;
+void cpu_down(int cpu)
{
struct machine_slot *ms;
processor_t processor;
@@ -153,9 +151,9 @@ host_reboot(host, options)
* a reference.
*/
void
-processor_request_action(processor, new_pset)
-processor_t processor;
-processor_set_t new_pset;
+processor_request_action(
+ processor_t processor,
+ processor_set_t new_pset)
{
processor_set_t pset;
@@ -228,10 +226,10 @@ processor_set_t new_pset;
* Synchronizes with assignment completion if wait is TRUE.
*/
kern_return_t
-processor_assign(processor, new_pset, wait)
-processor_t processor;
-processor_set_t new_pset;
-boolean_t wait;
+processor_assign(
+ processor_t processor,
+ processor_set_t new_pset,
+ boolean_t wait)
{
spl_t s;
@@ -315,10 +313,10 @@ Retry:
#else /* MACH_HOST */
kern_return_t
-processor_assign(processor, new_pset, wait)
-processor_t processor;
-processor_set_t new_pset;
-boolean_t wait;
+processor_assign(
+ processor_t processor,
+ processor_set_t new_pset,
+ boolean_t wait)
{
return KERN_FAILURE;
}
@@ -331,8 +329,7 @@ boolean_t wait;
* with the shutdown (can be called from interrupt level).
*/
kern_return_t
-processor_shutdown(processor)
-processor_t processor;
+processor_shutdown(processor_t processor)
{
spl_t s;
@@ -401,8 +398,7 @@ void __attribute__((noreturn)) action_thread(void)
* is to schedule ourselves onto a cpu and then save our
* context back into the runqs before taking out the cpu.
*/
-void processor_doaction(processor)
-processor_t processor;
+void processor_doaction(processor_t processor)
{
thread_t this_thread;
spl_t s;
@@ -650,10 +646,10 @@ processor_t processor;
#else /* NCPUS > 1 */
kern_return_t
-processor_assign(processor, new_pset, wait)
-processor_t processor;
-processor_set_t new_pset;
-boolean_t wait;
+processor_assign(
+ processor_t processor,
+ processor_set_t new_pset,
+ boolean_t wait)
{
return(KERN_FAILURE);
}
@@ -661,9 +657,9 @@ boolean_t wait;
#endif /* NCPUS > 1 */
kern_return_t
-host_get_boot_info(priv_host, boot_info)
- host_t priv_host;
- kernel_boot_info_t boot_info;
+host_get_boot_info(
+ host_t priv_host,
+ kernel_boot_info_t boot_info)
{
char *src = "";
diff --git a/kern/printf.c b/kern/printf.c
index ea78d48..1db0d08 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -626,9 +626,9 @@ snprintf(char *buf, size_t size, const char *fmt, ...)
return written;
}
-void safe_gets(str, maxlen)
- char *str;
- int maxlen;
+void safe_gets(
+ char *str,
+ int maxlen)
{
char *lp;
int c;
diff --git a/kern/priority.c b/kern/priority.c
index d9ded85..587ea2f 100644
--- a/kern/priority.c
+++ b/kern/priority.c
@@ -74,11 +74,11 @@
* Called only from clock_interrupt().
*/
-void thread_quantum_update(mycpu, thread, nticks, state)
- int mycpu;
- thread_t thread;
- int nticks;
- int state;
+void thread_quantum_update(
+ int mycpu,
+ thread_t thread,
+ int nticks,
+ int state)
{
int quantum;
processor_t myprocessor;
diff --git a/kern/startup.c b/kern/startup.c
index 12f5123..71cd04d 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -276,8 +276,7 @@ void slave_main(void)
* Start up the first thread on a CPU.
* First thread is specified for the master CPU.
*/
-void cpu_launch_first_thread(th)
- thread_t th;
+void cpu_launch_first_thread(thread_t th)
{
int mycpu;
diff --git a/kern/syscall_emulation.c b/kern/syscall_emulation.c
index da0a6cf..95e91d5 100644
--- a/kern/syscall_emulation.c
+++ b/kern/syscall_emulation.c
@@ -68,8 +68,9 @@ void eml_init(void)
* vector.
*/
-void eml_task_reference(task, parent)
- task_t task, parent;
+void eml_task_reference(
+ task_t task,
+ task_t parent)
{
eml_dispatch_t eml;
@@ -116,12 +117,11 @@ void eml_task_deallocate(task)
* set a list of emulated system calls for this task.
*/
kern_return_t
-task_set_emulation_vector_internal(task, vector_start, emulation_vector,
- emulation_vector_count)
- task_t task;
- int vector_start;
- emulation_vector_t emulation_vector;
- unsigned int emulation_vector_count;
+task_set_emulation_vector_internal(
+ task_t task,
+ int vector_start,
+ emulation_vector_t emulation_vector,
+ unsigned int emulation_vector_count)
{
eml_dispatch_t cur_eml, new_eml, old_eml;
vm_size_t new_size;
@@ -295,12 +295,11 @@ task_set_emulation_vector_internal(task, vector_start, emulation_vector,
* The list is out-of-line.
*/
kern_return_t
-task_set_emulation_vector(task, vector_start, emulation_vector,
- emulation_vector_count)
- task_t task;
- int vector_start;
- emulation_vector_t emulation_vector;
- unsigned int emulation_vector_count;
+task_set_emulation_vector(
+ task_t task,
+ int vector_start,
+ emulation_vector_t emulation_vector,
+ unsigned int emulation_vector_count)
{
kern_return_t kr;
vm_offset_t emul_vector_addr;
@@ -342,12 +341,11 @@ task_set_emulation_vector(task, vector_start, emulation_vector,
* List is returned out-of-line.
*/
kern_return_t
-task_get_emulation_vector(task, vector_start, emulation_vector,
- emulation_vector_count)
- task_t task;
- int *vector_start; /* out */
- emulation_vector_t *emulation_vector; /* out */
- unsigned int *emulation_vector_count; /* out */
+task_get_emulation_vector(
+ task_t task,
+ int *vector_start, /* out */
+ emulation_vector_t *emulation_vector, /* out */
+ unsigned int *emulation_vector_count) /* out */
{
eml_dispatch_t eml;
vm_size_t vector_size, size;
@@ -445,10 +443,10 @@ task_get_emulation_vector(task, vector_start, emulation_vector,
* task_set_emulation: [Server Entry]
* set up for user space emulation of syscalls within this task.
*/
-kern_return_t task_set_emulation(task, routine_entry_pt, routine_number)
- task_t task;
- vm_offset_t routine_entry_pt;
- int routine_number;
+kern_return_t task_set_emulation(
+ task_t task,
+ vm_offset_t routine_entry_pt,
+ int routine_number)
{
return task_set_emulation_vector_internal(task, routine_number,
&routine_entry_pt, 1);
diff --git a/kern/syscall_subr.c b/kern/syscall_subr.c
index ed153ad..3c369ef 100644
--- a/kern/syscall_subr.c
+++ b/kern/syscall_subr.c
@@ -48,8 +48,6 @@
#include <mach/policy.h>
#endif /* MACH_FIXPRI */
-
-
/*
* swtch and swtch_pri both attempt to context switch (logic in
* thread_block no-ops the context switch if nothing would happen).
@@ -104,8 +102,7 @@ void swtch_pri_continue(void)
/*NOTREACHED*/
}
-boolean_t swtch_pri(pri)
- int pri;
+boolean_t swtch_pri(int pri)
{
thread_t thread = current_thread();
processor_t myprocessor;
@@ -154,10 +151,10 @@ void thread_switch_continue(void)
* Fixed priority threads that call this get what they asked for
* even if that violates priority order.
*/
-kern_return_t thread_switch(thread_name, option, option_time)
-mach_port_t thread_name;
-int option;
-mach_msg_timeout_t option_time;
+kern_return_t thread_switch(
+ mach_port_t thread_name,
+ int option,
+ mach_msg_timeout_t option_time)
{
thread_t cur_thread = current_thread();
processor_t myprocessor;
@@ -282,9 +279,9 @@ mach_msg_timeout_t option_time;
* of zero will result in no timeout being scheduled.
*/
void
-thread_depress_priority(thread, depress_time)
-thread_t thread;
-mach_msg_timeout_t depress_time;
+thread_depress_priority(
+ thread_t thread,
+ mach_msg_timeout_t depress_time)
{
unsigned int ticks;
spl_t s;
@@ -320,8 +317,7 @@ mach_msg_timeout_t depress_time;
* Timeout routine for priority depression.
*/
void
-thread_depress_timeout(thread)
-thread_t thread;
+thread_depress_timeout(thread_t thread)
{
spl_t s;
@@ -349,8 +345,7 @@ thread_t thread;
* Prematurely abort priority depression if there is one.
*/
kern_return_t
-thread_depress_abort(thread)
-thread_t thread;
+thread_depress_abort(thread_t thread)
{
spl_t s;
diff --git a/kern/thread_swap.c b/kern/thread_swap.c
index 087c8bc..dc2924a 100644
--- a/kern/thread_swap.c
+++ b/kern/thread_swap.c
@@ -86,8 +86,7 @@ void swapper_init(void)
* our callers have already tried that route.
*/
-void thread_swapin(thread)
- thread_t thread;
+void thread_swapin(thread_t thread)
{
switch (thread->state & TH_SWAP_STATE) {
case TH_SWAPPED:
@@ -124,8 +123,7 @@ void thread_swapin(thread)
* it on a run queue. No locks should be held on entry, as it is
* likely that this routine will sleep (waiting for stack allocation).
*/
-void thread_doswapin(thread)
- thread_t thread;
+void thread_doswapin(thread_t thread)
{
spl_t s;
diff --git a/kern/time_stamp.c b/kern/time_stamp.c
index 7f4c0f6..ee141a0 100644
--- a/kern/time_stamp.c
+++ b/kern/time_stamp.c
@@ -33,8 +33,7 @@
* ts.c - kern_timestamp system call.
*/
kern_return_t
-kern_timestamp(tsp)
-struct tsval *tsp;
+kern_timestamp(struct tsval *tsp)
{
/*
temp.low_val = 0;
diff --git a/kern/timer.c b/kern/timer.c
index 47b834c..6d6517e 100644
--- a/kern/timer.c
+++ b/kern/timer.c
@@ -66,8 +66,7 @@ void init_timers(void)
/*
* timer_init initializes a single timer.
*/
-void timer_init(this_timer)
-timer_t this_timer;
+void timer_init(timer_t this_timer)
{
this_timer->low_bits = 0;
this_timer->high_bits = 0;
@@ -91,8 +90,7 @@ timer_t this_timer;
* exactly once for each cpu during the boot sequence.
*/
void
-start_timer(timer)
-timer_t timer;
+start_timer(timer_t timer)
{
timer->tstamp = get_timestamp();
current_timer[cpu_number()] = timer;
@@ -105,8 +103,7 @@ timer_t timer;
* from user mode.
*/
void
-time_trap_uentry(ts)
-unsigned ts;
+time_trap_uentry(unsigned ts)
{
int elapsed;
int mycpu;
@@ -191,9 +188,9 @@ time_trap_uexit(int ts)
* saved for time_int_exit.
*/
timer_t
-time_int_entry(ts,new_timer)
-unsigned ts;
-timer_t new_timer;
+time_int_entry(
+ unsigned ts,
+ timer_t new_timer)
{
int elapsed;
int mycpu;
@@ -232,9 +229,9 @@ timer_t new_timer;
* it.
*/
void
-time_int_exit(ts, old_timer)
-unsigned ts;
-timer_t old_timer;
+time_int_exit(
+ unsigned ts,
+ timer_t old_timer)
{
int elapsed;
int mycpu;
@@ -279,8 +276,7 @@ timer_t old_timer;
* Caller must lock out interrupts.
*/
void
-timer_switch(new_timer)
-timer_t new_timer;
+timer_switch(timer_t new_timer)
{
int elapsed;
int mycpu;
@@ -325,8 +321,7 @@ timer_t new_timer;
* timer_normalize normalizes the value of a timer. It is
* called only rarely, to make sure low_bits never overflows.
*/
-void timer_normalize(timer)
-timer_t timer;
+void timer_normalize(timer_t timer)
{
unsigned int high_increment;
@@ -352,9 +347,9 @@ timer_t timer;
* Keep coherent with db_time_grab below.
*/
-static void timer_grab(timer, save)
-timer_t timer;
-timer_save_t save;
+static void timer_grab(
+ timer_t timer,
+ timer_save_t save)
{
#if MACH_ASSERT
unsigned int passes=0;
@@ -386,9 +381,9 @@ timer_save_t save;
* above.
*
*/
-void db_timer_grab(timer, save)
-timer_t timer;
-timer_save_t save;
+void db_timer_grab(
+ timer_t timer,
+ timer_save_t save)
{
/* Don't worry about coherency */
@@ -405,9 +400,9 @@ timer_save_t save;
*/
void
-timer_read(timer, tv)
-timer_t timer;
-time_value_t *tv;
+timer_read(
+ timer_t timer,
+ time_value_t *tv)
{
timer_save_data_t temp;
@@ -431,10 +426,10 @@ time_value_t *tv;
*
* Needs to be kept coherent with thread_read_times ahead.
*/
-void thread_read_times(thread, user_time_p, system_time_p)
- thread_t thread;
- time_value_t *user_time_p;
- time_value_t *system_time_p;
+void thread_read_times(
+ thread_t thread,
+ time_value_t *user_time_p,
+ time_value_t *system_time_p)
{
timer_save_data_t temp;
timer_t timer;
@@ -465,10 +460,10 @@ void thread_read_times(thread, user_time_p, system_time_p)
* thread_read_times above.
*
*/
-void db_thread_read_times(thread, user_time_p, system_time_p)
- thread_t thread;
- time_value_t *user_time_p;
- time_value_t *system_time_p;
+void db_thread_read_times(
+ thread_t thread,
+ time_value_t *user_time_p,
+ time_value_t *system_time_p)
{
timer_save_data_t temp;
timer_t timer;
@@ -500,9 +495,9 @@ void db_thread_read_times(thread, user_time_p, system_time_p)
*/
unsigned
-timer_delta(timer, save)
-timer_t timer;
-timer_save_t save;
+timer_delta(
+ timer_t timer,
+ timer_save_t save)
{
timer_save_data_t new_save;
unsigned result;
diff --git a/kern/xpr.c b/kern/xpr.c
index a62472d..46cb227 100644
--- a/kern/xpr.c
+++ b/kern/xpr.c
@@ -56,9 +56,13 @@ struct xprbuf *xprptr; /* Currently allocated xprbuf */
struct xprbuf *xprlast; /* Pointer to end of circular buffer */
/*VARARGS1*/
-void xpr(msg, arg1, arg2, arg3, arg4, arg5)
-char *msg;
-int arg1, arg2, arg3, arg4, arg5;
+void xpr(
+ char *msg,
+ int arg1,
+ int arg2,
+ int arg3,
+ int arg4,
+ int arg5)
{
spl_t s;
struct xprbuf *x;
@@ -144,9 +148,9 @@ extern jmp_buf_t *db_recover;
* Called with arguments, it can dump xpr buffers in user tasks,
* assuming they use the same format as the kernel.
*/
-void xpr_dump(base, nbufs)
- struct xprbuf *base;
- int nbufs;
+void xpr_dump(
+ struct xprbuf *base,
+ int nbufs)
{
jmp_buf_t db_jmpbuf;
jmp_buf_t *prev;