OSDN Git Service

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