Jeff Dike | 4b84c69 | 2006-09-25 23:33:04 -0700 | [diff] [blame^] | 1 | /* |
2 | * Copyright (C) 2006 Jeff Dike (jdike@addtoit.com) | ||||
3 | * Licensed under the GPL | ||||
4 | */ | ||||
5 | |||||
6 | #include <signal.h> | ||||
7 | |||||
8 | extern void (*handlers[])(int sig, struct sigcontext *sc); | ||||
9 | |||||
10 | void hard_handler(int sig) | ||||
11 | { | ||||
12 | struct ucontext *uc; | ||||
13 | asm("movq %%rdx, %0" : "=r" (uc)); | ||||
14 | |||||
15 | (*handlers[sig])(sig, (struct sigcontext *) &uc->uc_mcontext); | ||||
16 | } |