signal.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (C) 2004 PathScale, Inc
  3. * Licensed under the GPL
  4. */
  5. #include <signal.h>
  6. #include "time_user.h"
  7. #include "mode.h"
  8. #include "sysdep/signal.h"
  9. void sig_handler(ARCH_SIGHDLR_PARAM)
  10. {
  11. struct sigcontext *sc;
  12. ARCH_GET_SIGCONTEXT(sc, sig);
  13. CHOOSE_MODE_PROC(sig_handler_common_tt, sig_handler_common_skas,
  14. sig, sc);
  15. }
  16. extern int timer_irq_inited;
  17. void alarm_handler(ARCH_SIGHDLR_PARAM)
  18. {
  19. struct sigcontext *sc;
  20. ARCH_GET_SIGCONTEXT(sc, sig);
  21. if(!timer_irq_inited) return;
  22. if(sig == SIGALRM)
  23. switch_timers(0);
  24. CHOOSE_MODE_PROC(sig_handler_common_tt, sig_handler_common_skas,
  25. sig, sc);
  26. if(sig == SIGALRM)
  27. switch_timers(1);
  28. }
  29. /*
  30. * Overrides for Emacs so that we follow Linus's tabbing style.
  31. * Emacs will notice this stuff at the end of the file and automatically
  32. * adjust the settings for this buffer only. This must remain at the end
  33. * of the file.
  34. * ---------------------------------------------------------------------------
  35. * Local variables:
  36. * c-file-style: "linux"
  37. * End:
  38. */