time.c 865 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #include <sys/signal.h>
  6. #include <sys/time.h>
  7. #include "time_user.h"
  8. #include "process.h"
  9. #include "user.h"
  10. void user_time_init_skas(void)
  11. {
  12. if(signal(SIGALRM, (__sighandler_t) alarm_handler) == SIG_ERR)
  13. panic("Couldn't set SIGALRM handler");
  14. if(signal(SIGVTALRM, (__sighandler_t) alarm_handler) == SIG_ERR)
  15. panic("Couldn't set SIGVTALRM handler");
  16. set_interval(ITIMER_VIRTUAL);
  17. }
  18. /*
  19. * Overrides for Emacs so that we follow Linus's tabbing style.
  20. * Emacs will notice this stuff at the end of the file and automatically
  21. * adjust the settings for this buffer only. This must remain at the end
  22. * of the file.
  23. * ---------------------------------------------------------------------------
  24. * Local variables:
  25. * c-file-style: "linux"
  26. * End:
  27. */