7 #include <linux/signal.h>
9 #include <linux/ptrace.h>
10 #include <linux/tty.h>
11 #include <linux/personality.h>
12 #include <linux/binfmts.h>
16 #include <asm/cacheflush.h>
17 #include <asm/ucontext.h>
19 #include <asm/syscall.h>
22 #define TRACE_BITS 0x0001
48 unsigned long usp = 0;
54 #define RESTORE(x) err |= __get_user(regs->x, &sc->sc_##x)
88 unsigned long usp = rdusp();
100 if (rt_restore_sigcontext(regs, &frame->
uc.uc_mcontext, &r0))
117 #define SETUP(x) err |= __put_user(regs->x, &sc->sc_##x)
153 if (!on_sig_stack(usp))
156 return (
void *)((usp - frame_size) & -8
UL);
166 frame = get_sigframe(ka, regs,
sizeof(*frame));
172 signal_invmap[sig] : sig), &frame->
sig);
183 err |=
__put_user(sas_ss_flags(rdusp()), &frame->
uc.uc_stack.ss_flags);
185 err |= rt_setup_sigcontext(&frame->
uc.uc_mcontext, regs);
203 regs->
pc = (
unsigned long)ka->
sa.sa_handler;
207 regs->
r0 = frame->
sig;
209 regs->
r2 = (
unsigned long)(&frame->
uc);
254 handle_restart(regs, ka, 1);
257 if (setup_rt_frame(sig, ka, info, sigmask_to_save(), regs) < 0)
284 handle_signal(signr, &info, &ka, regs);
291 handle_restart(regs,
NULL, 0);
295 restore_saved_sigmask();
308 tracehook_notify_resume(regs);