diff options
author | Gennady Sharapov <Gennady.V.Sharapov@intel.com> | 2006-01-08 04:01:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:13:39 -0500 |
commit | ea2ba7dc3dd3f85034e6da6abacc813d723a2ad5 (patch) | |
tree | 56f3d2a22d3ba3d91042d9a536b659b9c967dc03 /arch/um/include | |
parent | 0805d89c151b4800eade4c2f50d39c5253d7d054 (diff) |
[PATCH] uml: move libc-dependent code from trap_user.c
The serial UML OS-abstraction layer patch (um/kernel dir).
This moves all systemcalls from trap_user.c file under os-Linux dir
Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/kern_util.h | 17 | ||||
-rw-r--r-- | arch/um/include/os.h | 6 | ||||
-rw-r--r-- | arch/um/include/user_util.h | 10 |
3 files changed, 24 insertions, 9 deletions
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index 58c0b10fcf2d..8f4e46d677ab 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -10,6 +10,19 @@ | |||
10 | #include "sysdep/ptrace.h" | 10 | #include "sysdep/ptrace.h" |
11 | #include "sysdep/faultinfo.h" | 11 | #include "sysdep/faultinfo.h" |
12 | 12 | ||
13 | typedef void (*kern_hndl)(int, union uml_pt_regs *); | ||
14 | |||
15 | struct kern_handlers { | ||
16 | kern_hndl relay_signal; | ||
17 | kern_hndl winch; | ||
18 | kern_hndl bus_handler; | ||
19 | kern_hndl page_fault; | ||
20 | kern_hndl sigio_handler; | ||
21 | kern_hndl timer_handler; | ||
22 | }; | ||
23 | |||
24 | extern struct kern_handlers handlinfo_kern; | ||
25 | |||
13 | extern int ncpus; | 26 | extern int ncpus; |
14 | extern char *linux_prog; | 27 | extern char *linux_prog; |
15 | extern char *gdb_init; | 28 | extern char *gdb_init; |
@@ -109,6 +122,8 @@ extern void arch_switch(void); | |||
109 | extern void free_irq(unsigned int, void *); | 122 | extern void free_irq(unsigned int, void *); |
110 | extern int um_in_interrupt(void); | 123 | extern int um_in_interrupt(void); |
111 | extern int cpu(void); | 124 | extern int cpu(void); |
125 | extern void segv_handler(int sig, union uml_pt_regs *regs); | ||
126 | extern void sigio_handler(int sig, union uml_pt_regs *regs); | ||
112 | 127 | ||
113 | #endif | 128 | #endif |
114 | 129 | ||
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index cfc806e4610b..dd72d66cf0ed 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #include "uml-config.h" | 9 | #include "uml-config.h" |
10 | #include "asm/types.h" | 10 | #include "asm/types.h" |
11 | #include "../os/include/file.h" | 11 | #include "../os/include/file.h" |
12 | #include "sysdep/ptrace.h" | ||
13 | #include "kern_util.h" | ||
12 | 14 | ||
13 | #define OS_TYPE_FILE 1 | 15 | #define OS_TYPE_FILE 1 |
14 | #define OS_TYPE_DIR 2 | 16 | #define OS_TYPE_DIR 2 |
@@ -229,4 +231,8 @@ extern void unblock_signals(void); | |||
229 | extern int get_signals(void); | 231 | extern int get_signals(void); |
230 | extern int set_signals(int enable); | 232 | extern int set_signals(int enable); |
231 | 233 | ||
234 | /* trap.c */ | ||
235 | extern void os_fill_handlinfo(struct kern_handlers h); | ||
236 | extern void do_longjmp(void *p, int val); | ||
237 | |||
232 | #endif | 238 | #endif |
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h index b9984003e603..c1dbd77b073f 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -23,12 +23,7 @@ struct cpu_task { | |||
23 | 23 | ||
24 | extern struct cpu_task cpu_tasks[]; | 24 | extern struct cpu_task cpu_tasks[]; |
25 | 25 | ||
26 | struct signal_info { | 26 | extern void (*sig_info[])(int, union uml_pt_regs *); |
27 | void (*handler)(int, union uml_pt_regs *); | ||
28 | int is_irq; | ||
29 | }; | ||
30 | |||
31 | extern struct signal_info sig_info[]; | ||
32 | 27 | ||
33 | extern unsigned long low_physmem; | 28 | extern unsigned long low_physmem; |
34 | extern unsigned long high_physmem; | 29 | extern unsigned long high_physmem; |
@@ -64,7 +59,6 @@ extern void setup_machinename(char *machine_out); | |||
64 | extern void setup_hostinfo(void); | 59 | extern void setup_hostinfo(void); |
65 | extern void do_exec(int old_pid, int new_pid); | 60 | extern void do_exec(int old_pid, int new_pid); |
66 | extern void tracer_panic(char *msg, ...); | 61 | extern void tracer_panic(char *msg, ...); |
67 | extern void do_longjmp(void *p, int val); | ||
68 | extern int detach(int pid, int sig); | 62 | extern int detach(int pid, int sig); |
69 | extern int attach(int pid); | 63 | extern int attach(int pid); |
70 | extern void kill_child_dead(int pid); | 64 | extern void kill_child_dead(int pid); |