From ea2ba7dc3dd3f85034e6da6abacc813d723a2ad5 Mon Sep 17 00:00:00 2001 From: Gennady Sharapov Date: Sun, 8 Jan 2006 01:01:31 -0800 Subject: [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 Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/include/kern_util.h | 17 ++++++++++++++++- arch/um/include/os.h | 6 ++++++ arch/um/include/user_util.h | 10 ++-------- 3 files changed, 24 insertions(+), 9 deletions(-) (limited to 'arch/um/include') diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index 58c0b10fcf2..8f4e46d677a 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ @@ -10,6 +10,19 @@ #include "sysdep/ptrace.h" #include "sysdep/faultinfo.h" +typedef void (*kern_hndl)(int, union uml_pt_regs *); + +struct kern_handlers { + kern_hndl relay_signal; + kern_hndl winch; + kern_hndl bus_handler; + kern_hndl page_fault; + kern_hndl sigio_handler; + kern_hndl timer_handler; +}; + +extern struct kern_handlers handlinfo_kern; + extern int ncpus; extern char *linux_prog; extern char *gdb_init; @@ -109,6 +122,8 @@ extern void arch_switch(void); extern void free_irq(unsigned int, void *); extern int um_in_interrupt(void); extern int cpu(void); +extern void segv_handler(int sig, union uml_pt_regs *regs); +extern void sigio_handler(int sig, union uml_pt_regs *regs); #endif diff --git a/arch/um/include/os.h b/arch/um/include/os.h index cfc806e4610..dd72d66cf0e 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h @@ -9,6 +9,8 @@ #include "uml-config.h" #include "asm/types.h" #include "../os/include/file.h" +#include "sysdep/ptrace.h" +#include "kern_util.h" #define OS_TYPE_FILE 1 #define OS_TYPE_DIR 2 @@ -229,4 +231,8 @@ extern void unblock_signals(void); extern int get_signals(void); extern int set_signals(int enable); +/* trap.c */ +extern void os_fill_handlinfo(struct kern_handlers h); +extern void do_longjmp(void *p, int val); + #endif diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h index b9984003e60..c1dbd77b073 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ @@ -23,12 +23,7 @@ struct cpu_task { extern struct cpu_task cpu_tasks[]; -struct signal_info { - void (*handler)(int, union uml_pt_regs *); - int is_irq; -}; - -extern struct signal_info sig_info[]; +extern void (*sig_info[])(int, union uml_pt_regs *); extern unsigned long low_physmem; extern unsigned long high_physmem; @@ -64,7 +59,6 @@ extern void setup_machinename(char *machine_out); extern void setup_hostinfo(void); extern void do_exec(int old_pid, int new_pid); extern void tracer_panic(char *msg, ...); -extern void do_longjmp(void *p, int val); extern int detach(int pid, int sig); extern int attach(int pid); extern void kill_child_dead(int pid); -- cgit v1.2.3