From 151dfe9971ac2bd4d9afb440f2a5b2a4f9a58969 Mon Sep 17 00:00:00 2001 From: Guy-Fleury Iteriteka Date: Thu, 26 May 2022 18:07:41 +0200 Subject: convert K&R into ansi Message-Id: --- kern/machine.c | 7 ++----- kern/profile.c | 15 +++++---------- 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'kern') diff --git a/kern/machine.c b/kern/machine.c index 2fe30cee..0e1781cc 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -125,9 +125,7 @@ void cpu_down(int cpu) } kern_return_t -host_reboot(host, options) - const host_t host; - int options; +host_reboot(const host_t host, int options) { if (host == HOST_NULL) return (KERN_INVALID_HOST); @@ -623,8 +621,7 @@ Restart_pset: * running on the processor's shutdown stack. */ -void processor_doshutdown(processor) -processor_t processor; +void processor_doshutdown(processor_t processor) { int cpu = processor->slot_num; diff --git a/kern/profile.c b/kern/profile.c index b33d6953..4fcd541f 100644 --- a/kern/profile.c +++ b/kern/profile.c @@ -180,8 +180,7 @@ printf("profile_thread: mach_msg failed returned %x\n",(int)mr); #include void -send_last_sample_buf(th) -thread_t th; +send_last_sample_buf(thread_t th) { spl_t s; buf_to_send_t buf_entry; @@ -290,10 +289,9 @@ profile(pc) { MiG, even though it is not used in the function itself. */ kern_return_t -mach_sample_thread (task, reply, cur_thread) -ipc_space_t task; -ipc_object_t reply; -thread_t cur_thread; +mach_sample_thread (ipc_space_t task, + ipc_object_t reply, + thread_t cur_thread) { /* * This routine is called every time that a new thread has made @@ -349,10 +347,7 @@ printf("ERROR:mach_sample_thread:cannot set pbuf_nb\n"); } kern_return_t -mach_sample_task (task, reply, cur_task) -ipc_space_t task; -ipc_object_t reply; -task_t cur_task; +mach_sample_task (ipc_space_t task, ipc_object_t reply, task_t cur_task) { prof_data_t pbuf=cur_task->profil_buffer; vm_offset_t vmpbuf; -- cgit v1.2.3