2 * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
8 #include <asm/sigcontext.h>
9 #include "sysdep/ptrace.h"
10 #include "signal_user.h"
11 #include "user_util.h"
12 #include "kern_util.h"
14 #include "sigcontext.h"
16 void sig_handler_common_skas(int sig, void *sc_ptr)
18 struct sigcontext *sc = sc_ptr;
20 struct signal_info *info;
21 int save_errno = errno;
24 r = &TASK_REGS(get_current())->skas;
25 save_user = r->is_user;
27 r->fault_addr = SC_FAULT_ADDR(sc);
28 r->fault_type = SC_FAULT_TYPE(sc);
29 r->trap_type = SC_TRAP_TYPE(sc);
31 change_sig(SIGUSR1, 1);
32 info = &sig_info[sig];
33 if(!info->is_irq) unblock_signals();
35 (*info->handler)(sig, (union uml_pt_regs *) r);
38 r->is_user = save_user;
41 void user_signal(int sig, union uml_pt_regs *regs)
43 struct signal_info *info;
45 regs->skas.is_user = 1;
46 regs->skas.fault_addr = 0;
47 regs->skas.fault_type = 0;
48 regs->skas.trap_type = 0;
49 info = &sig_info[sig];
50 (*info->handler)(sig, regs);
56 * Overrides for Emacs so that we follow Linus's tabbing style.
57 * Emacs will notice this stuff at the end of the file and automatically
58 * adjust the settings for this buffer only. This must remain at the end
60 * ---------------------------------------------------------------------------
62 * c-file-style: "linux"