2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
9 #include <asm/sigcontext.h>
10 #include "sysdep/ptrace.h"
11 #include "signal_user.h"
12 #include "user_util.h"
13 #include "kern_util.h"
17 void sig_handler_common_tt(int sig
, void *sc_ptr
)
19 struct sigcontext
*sc
= sc_ptr
;
20 struct tt_regs save_regs
, *r
;
21 struct signal_info
*info
;
22 int save_errno
= errno
, is_user
;
24 unprotect_kernel_mem();
26 /* This is done because to allow SIGSEGV to be delivered inside a SEGV
27 * handler. This can happen in copy_user, and if SEGV is disabled,
28 * the process will die.
31 change_sig(SIGSEGV
, 1);
33 r
= &TASK_REGS(get_current())->tt
;
35 is_user
= user_context(SC_SP(sc
));
40 info
= &sig_info
[sig
];
41 if(!info
->is_irq
) unblock_signals();
43 (*info
->handler
)(sig
, (union uml_pt_regs
*) r
);
52 if(is_user
) protect_kernel_mem();
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"