diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-06 17:51:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:13:02 -0400 |
commit | 6e21aec3fcf6c8862b755d45c0af45acdefff976 (patch) | |
tree | 1e2bcf6ae8ac4a6e62766cb1cddf073410d4ea5c /arch/um/include/kern_util.h | |
parent | 65a58ab044308ae65ca06c50fb10be5e0e080989 (diff) |
uml: tidy process.c
Clean up arch/um/kernel/process.c:
- lots of return(x); -> return x; conversions
- a number of the small functions are either unused, in which case they are
gone, along any declarations in a header, or could be made static.
- current_pid is ifdefed on CONFIG_MODE_TT and its declaration is ifdefed on
both CONFIG_MODE_TT and UML_CONFIG_MODE_TT because we don't know whether
it's being used in a userspace or kernel file.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/include/kern_util.h')
-rw-r--r-- | arch/um/include/kern_util.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index be850b9ec947..09810bc48e5b 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include "sysdep/ptrace.h" | 9 | #include "sysdep/ptrace.h" |
10 | #include "sysdep/faultinfo.h" | 10 | #include "sysdep/faultinfo.h" |
11 | #include "uml-config.h" | ||
11 | 12 | ||
12 | typedef void (*kern_hndl)(int, union uml_pt_regs *); | 13 | typedef void (*kern_hndl)(int, union uml_pt_regs *); |
13 | 14 | ||
@@ -33,7 +34,9 @@ extern int nsyscalls; | |||
33 | UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1) | 34 | UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1) |
34 | 35 | ||
35 | extern int kernel_fork(unsigned long flags, int (*fn)(void *), void * arg); | 36 | extern int kernel_fork(unsigned long flags, int (*fn)(void *), void * arg); |
37 | #ifdef UML_CONFIG_MODE_TT | ||
36 | extern unsigned long stack_sp(unsigned long page); | 38 | extern unsigned long stack_sp(unsigned long page); |
39 | #endif | ||
37 | extern int kernel_thread_proc(void *data); | 40 | extern int kernel_thread_proc(void *data); |
38 | extern void syscall_segv(int sig); | 41 | extern void syscall_segv(int sig); |
39 | extern int current_pid(void); | 42 | extern int current_pid(void); |
@@ -57,7 +60,6 @@ extern void add_input_request(int op, void (*proc)(int), void *arg); | |||
57 | extern char *current_cmd(void); | 60 | extern char *current_cmd(void); |
58 | extern void timer_handler(int sig, union uml_pt_regs *regs); | 61 | extern void timer_handler(int sig, union uml_pt_regs *regs); |
59 | extern int set_signals(int enable); | 62 | extern int set_signals(int enable); |
60 | extern void force_sigbus(void); | ||
61 | extern int pid_to_processor_id(int pid); | 63 | extern int pid_to_processor_id(int pid); |
62 | extern void deliver_signals(void *t); | 64 | extern void deliver_signals(void *t); |
63 | extern int next_trap_index(int max); | 65 | extern int next_trap_index(int max); |
@@ -69,7 +71,6 @@ extern void *syscall_sp(void *t); | |||
69 | extern void syscall_trace(union uml_pt_regs *regs, int entryexit); | 71 | extern void syscall_trace(union uml_pt_regs *regs, int entryexit); |
70 | extern int hz(void); | 72 | extern int hz(void); |
71 | extern unsigned int do_IRQ(int irq, union uml_pt_regs *regs); | 73 | extern unsigned int do_IRQ(int irq, union uml_pt_regs *regs); |
72 | extern int external_pid(void *t); | ||
73 | extern void interrupt_end(void); | 74 | extern void interrupt_end(void); |
74 | extern void initial_thread_cb(void (*proc)(void *), void *arg); | 75 | extern void initial_thread_cb(void (*proc)(void *), void *arg); |
75 | extern int debugger_signal(int status, int pid); | 76 | extern int debugger_signal(int status, int pid); |
@@ -80,7 +81,6 @@ extern int init_parent_proxy(int pid); | |||
80 | extern int singlestepping(void *t); | 81 | extern int singlestepping(void *t); |
81 | extern void check_stack_overflow(void *ptr); | 82 | extern void check_stack_overflow(void *ptr); |
82 | extern void relay_signal(int sig, union uml_pt_regs *regs); | 83 | extern void relay_signal(int sig, union uml_pt_regs *regs); |
83 | extern void not_implemented(void); | ||
84 | extern int user_context(unsigned long sp); | 84 | extern int user_context(unsigned long sp); |
85 | extern void timer_irq(union uml_pt_regs *regs); | 85 | extern void timer_irq(union uml_pt_regs *regs); |
86 | extern void unprotect_stack(unsigned long stack); | 86 | extern void unprotect_stack(unsigned long stack); |
@@ -92,7 +92,6 @@ extern char *uml_strdup(char *string); | |||
92 | extern void unprotect_kernel_mem(void); | 92 | extern void unprotect_kernel_mem(void); |
93 | extern void protect_kernel_mem(void); | 93 | extern void protect_kernel_mem(void); |
94 | extern void uml_cleanup(void); | 94 | extern void uml_cleanup(void); |
95 | extern void set_current(void *t); | ||
96 | extern void lock_signalled_task(void *t); | 95 | extern void lock_signalled_task(void *t); |
97 | extern void IPI_handler(int cpu); | 96 | extern void IPI_handler(int cpu); |
98 | extern int jail_setup(char *line, int *add); | 97 | extern int jail_setup(char *line, int *add); |