signal.c 321 B

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