kernel-posix-timers.h 859 B

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