diff options
Diffstat (limited to 'kern')
-rw-r--r-- | kern/bootstrap.c | 1 | ||||
-rw-r--r-- | kern/debug.c | 2 | ||||
-rw-r--r-- | kern/ipc_mig.c | 10 | ||||
-rw-r--r-- | kern/mach_clock.c | 2 | ||||
-rw-r--r-- | kern/machine.c | 3 | ||||
-rw-r--r-- | kern/priority.c | 1 | ||||
-rw-r--r-- | kern/processor.c | 2 | ||||
-rw-r--r-- | kern/queue.c | 10 | ||||
-rw-r--r-- | kern/sched_prim.c | 12 | ||||
-rw-r--r-- | kern/syscall_emulation.c | 2 | ||||
-rw-r--r-- | kern/syscall_subr.c | 6 | ||||
-rw-r--r-- | kern/syscall_sw.c | 4 | ||||
-rw-r--r-- | kern/task.c | 2 | ||||
-rw-r--r-- | kern/thread.c | 9 |
14 files changed, 30 insertions, 36 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c index 6593fed1..fdc75757 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -40,6 +40,7 @@ #include <machine/pcb.h> #include <ipc/ipc_port.h> #include <ipc/mach_port.h> +#include <kern/bootstrap.h> #include <kern/debug.h> #include <kern/host.h> #include <kern/printf.h> diff --git a/kern/debug.c b/kern/debug.c index 78c55f81..3b472ff2 100644 --- a/kern/debug.c +++ b/kern/debug.c @@ -205,6 +205,8 @@ unsigned char __stack_chk_guard [ sizeof (vm_offset_t) ] = [ sizeof (vm_offset_t) - 1 ] = 0xff, }; +void __stack_chk_fail (void); + void __stack_chk_fail (void) { diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c index f353009e..a9e3f53b 100644 --- a/kern/ipc_mig.c +++ b/kern/ipc_mig.c @@ -330,7 +330,7 @@ MACRO_BEGIN \ is_read_unlock(space); \ MACRO_END -device_t +static device_t port_name_to_device(mach_port_name_t name) { ipc_port_t port; @@ -373,7 +373,7 @@ port_name_to_device(mach_port_name_t name) } } -thread_t +static thread_t port_name_to_thread(mach_port_name_t name) { ipc_port_t port; @@ -418,7 +418,7 @@ port_name_to_thread(mach_port_name_t name) } } -task_t +static task_t port_name_to_task(mach_port_name_t name) { ipc_port_t port; @@ -465,7 +465,7 @@ port_name_to_task(mach_port_name_t name) } } -vm_map_t +static vm_map_t port_name_to_map( mach_port_name_t name) { @@ -513,7 +513,7 @@ port_name_to_map( } } -ipc_space_t +static ipc_space_t port_name_to_space(mach_port_name_t name) { ipc_port_t port; diff --git a/kern/mach_clock.c b/kern/mach_clock.c index 3a568647..6f964f73 100644 --- a/kern/mach_clock.c +++ b/kern/mach_clock.c @@ -405,7 +405,7 @@ struct time_value clock_boottime_offset; * This function must be called when the real-time clock is updated. * This function must be called at SPLHIGH. */ -void +static void clock_boottime_update(struct time_value *new_time) { struct time_value delta = time; diff --git a/kern/machine.c b/kern/machine.c index 0e1781cc..6f481a5c 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -44,6 +44,7 @@ #include <kern/debug.h> #include <kern/ipc_host.h> #include <kern/host.h> +#include <kern/machine.h> #include <kern/lock.h> #include <kern/processor.h> #include <kern/queue.h> @@ -103,7 +104,7 @@ void cpu_up(int cpu) * Flag specified cpu as down. Called when a processor is about to * go offline. */ -void cpu_down(int cpu) +static void cpu_down(int cpu) { struct machine_slot *ms; processor_t processor; diff --git a/kern/priority.c b/kern/priority.c index 587ea2f9..3dba0c80 100644 --- a/kern/priority.c +++ b/kern/priority.c @@ -42,6 +42,7 @@ #include <kern/sched.h> #include <kern/sched_prim.h> #include <kern/thread.h> +#include <kern/priority.h> #include <kern/processor.h> #include <kern/timer.h> #include <kern/time_stamp.h> diff --git a/kern/processor.c b/kern/processor.c index ec56952e..75d2ff53 100644 --- a/kern/processor.c +++ b/kern/processor.c @@ -845,7 +845,7 @@ processor_set_policy_disable( * * Common internals for processor_set_{threads,tasks} */ -kern_return_t +static kern_return_t processor_set_things( processor_set_t pset, mach_port_t **thing_list, diff --git a/kern/queue.c b/kern/queue.c index d9396e54..f5326202 100644 --- a/kern/queue.c +++ b/kern/queue.c @@ -119,13 +119,3 @@ void insque( (pred->next)->prev = entry; pred->next = entry; } - -struct queue_entry -*remque( - struct queue_entry *elt) -{ - (elt->next)->prev = elt->prev; - (elt->prev)->next = elt->next; - return(elt); -} - diff --git a/kern/sched_prim.c b/kern/sched_prim.c index 63a0437c..9e7a9c55 100644 --- a/kern/sched_prim.c +++ b/kern/sched_prim.c @@ -134,7 +134,7 @@ decl_simple_lock_data(, wait_lock[NUMQUEUES]) #define wait_hash(event) \ ((((long)(event) < 0) ? ~(long)(event) : (long)(event)) % NUMQUEUES) -void wait_queue_init(void) +static void wait_queue_init(void) { int i; @@ -162,7 +162,7 @@ void sched_init(void) * Thread timeout routine, called when timer expires. * Called at splsoftclock. */ -void thread_timeout( +static void thread_timeout( void *_thread) { thread_t thread = _thread; @@ -490,7 +490,7 @@ void thread_bind( * Assumes splsched. */ -thread_t thread_select( +static thread_t thread_select( processor_t myprocessor) { thread_t thread; @@ -1604,7 +1604,7 @@ int no_dispatch_count = 0; * to execute. */ -void __attribute__((noreturn)) idle_thread_continue(void) +static void __attribute__((noreturn)) idle_thread_continue(void) { processor_t myprocessor; volatile thread_t *threadp; @@ -1795,7 +1795,7 @@ void idle_thread(void) * we don't want to do at interrupt level. This allows us to * avoid blocking. */ -void sched_thread_continue(void) +static void sched_thread_continue(void) { while (TRUE) { (void) compute_mach_factor(); @@ -1860,7 +1860,7 @@ int stuck_count = 0; * it ran out of space. */ -boolean_t +static boolean_t do_runq_scan( run_queue_t runq) { diff --git a/kern/syscall_emulation.c b/kern/syscall_emulation.c index 95e91d55..5a477006 100644 --- a/kern/syscall_emulation.c +++ b/kern/syscall_emulation.c @@ -116,7 +116,7 @@ void eml_task_deallocate(task) * task_set_emulation_vector: [Server Entry] * set a list of emulated system calls for this task. */ -kern_return_t +static kern_return_t task_set_emulation_vector_internal( task_t task, int vector_start, diff --git a/kern/syscall_subr.c b/kern/syscall_subr.c index 1aa4bc27..0030e027 100644 --- a/kern/syscall_subr.c +++ b/kern/syscall_subr.c @@ -61,7 +61,7 @@ * returned, the thread should make one more check on the * lock and then be a good citizen and really suspend. */ -void swtch_continue(void) +static void swtch_continue(void) { processor_t myprocessor; @@ -89,7 +89,7 @@ boolean_t swtch(void) myprocessor->processor_set->runq.count > 0); } -void swtch_pri_continue(void) +static void swtch_pri_continue(void) { thread_t thread = current_thread(); processor_t myprocessor; @@ -130,7 +130,7 @@ boolean_t swtch_pri(int pri) myprocessor->processor_set->runq.count > 0); } -void thread_switch_continue(void) +static void thread_switch_continue(void) { thread_t cur_thread = current_thread(); diff --git a/kern/syscall_sw.c b/kern/syscall_sw.c index 3cdefde1..f2163132 100644 --- a/kern/syscall_sw.c +++ b/kern/syscall_sw.c @@ -60,13 +60,13 @@ boolean_t kern_invalid_debug = FALSE; -mach_port_name_t null_port(void) +static mach_port_name_t null_port(void) { if (kern_invalid_debug) SoftDebugger("null_port mach trap"); return(MACH_PORT_NULL); } -kern_return_t kern_invalid(void) +static kern_return_t kern_invalid(void) { if (kern_invalid_debug) SoftDebugger("kern_invalid mach trap"); return(KERN_INVALID_ARGUMENT); diff --git a/kern/task.c b/kern/task.c index e9158c73..d5bd14c2 100644 --- a/kern/task.c +++ b/kern/task.c @@ -1178,7 +1178,7 @@ task_set_essential( * Attempt to free resources owned by tasks. */ -void task_collect_scan(void) +static void task_collect_scan(void) { task_t task, prev_task; processor_set_t pset, prev_pset; diff --git a/kern/thread.c b/kern/thread.c index 82863b38..c420869f 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -1136,7 +1136,7 @@ kern_return_t thread_halt( } } -void __attribute__((noreturn)) walking_zombie(void) +static void __attribute__((noreturn)) walking_zombie(void) { panic("the zombie walks!"); } @@ -1722,7 +1722,7 @@ thread_t kernel_thread( * This kernel thread runs forever looking for threads to destroy * (when they request that they be destroyed, of course). */ -void __attribute__((noreturn)) reaper_thread_continue(void) +static void __attribute__((noreturn)) reaper_thread_continue(void) { for (;;) { thread_t thread; @@ -2261,7 +2261,7 @@ thread_wire( * pcb_collect doesn't do anything yet. */ -void thread_collect_scan(void) +static void thread_collect_scan(void) { thread_t thread, prev_thread; processor_set_t pset, prev_pset; @@ -2348,8 +2348,7 @@ void consider_thread_collect(void) #if MACH_DEBUG -vm_size_t stack_usage( - vm_offset_t stack) +static vm_size_t stack_usage(vm_offset_t stack) { unsigned i; |