kernel-posix-timers.h 763 B

12345678910111213141516171819202122232425262728293031
  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. #include <pthread.h>
  8. /* Type of timers in the kernel */
  9. typedef int kernel_timer_t;
  10. /* Internal representation of timer */
  11. struct timer {
  12. /* Notification mechanism */
  13. int sigev_notify;
  14. /* Timer ID returned by the kernel */
  15. kernel_timer_t ktimerid;
  16. /*
  17. * All new elements must be added after ktimerid. And if the thrfunc
  18. * element is not the third element anymore the memory allocation in
  19. * timer_create needs to be changed.
  20. */
  21. /* Parameters for the thread to be started for SIGEV_THREAD */
  22. void (*thrfunc) (sigval_t);
  23. sigval_t sival;
  24. pthread_attr_t attr;
  25. };