Go to the documentation of this file. 1 #ifndef _linux_POSIX_TIMERS_H
2 #define _linux_POSIX_TIMERS_H
5 #include <linux/list.h>
6 #include <linux/sched.h>
7 #include <linux/timex.h>
33 #define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3))
34 #define CPUCLOCK_PERTHREAD(clock) \
35 (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0)
37 #define CPUCLOCK_PERTHREAD_MASK 4
38 #define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK)
39 #define CPUCLOCK_CLOCK_MASK 3
40 #define CPUCLOCK_PROF 0
41 #define CPUCLOCK_VIRT 1
42 #define CPUCLOCK_SCHED 2
43 #define CPUCLOCK_MAX 3
44 #define CLOCKFD CPUCLOCK_MAX
45 #define CLOCKFD_MASK (CPUCLOCK_PERTHREAD_MASK|CPUCLOCK_CLOCK_MASK)
47 #define MAKE_PROCESS_CPUCLOCK(pid, clock) \
48 ((~(clockid_t) (pid) << 3) | (clockid_t) (clock))
49 #define MAKE_THREAD_CPUCLOCK(tid, clock) \
50 MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK)
52 #define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD)
53 #define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3))
64 #define REQUEUE_PENDING 1
106 #define TIMER_RETRY 1