kernel-posix-timers.h 742 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * kernel-posix-timers.h - kernel-dependent definitions for POSIX timers.
  3. */
  4. #include <setjmp.h>
  5. #include <signal.h>
  6. #include <sys/types.h>
  7. /* Type of timers in the kernel */
  8. typedef int kernel_timer_t;
  9. /* Internal representation of timer */
  10. struct timer {
  11. /* Notification mechanism */
  12. int sigev_notify;
  13. /* Timer ID returned by the kernel */
  14. kernel_timer_t ktimerid;
  15. /*
  16. * All new elements must be added after ktimerid. And if the thrfunc
  17. * element is not the third element anymore the memory allocation in
  18. * timer_create needs to be changed.
  19. */
  20. /* Parameters for the thread to be started for SIGEV_THREAD */
  21. void (*thrfunc) (sigval_t);
  22. sigval_t sival;
  23. pthread_attr_t attr;
  24. };