aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/posix-timers.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/posix-timers.h')
-rw-r--r--include/linux/posix-timers.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 9d6ffe2c92e5..d51243ae0726 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -32,7 +32,7 @@ struct cpu_timer_list {
32#define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3)) 32#define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3))
33#define CPUCLOCK_PERTHREAD(clock) \ 33#define CPUCLOCK_PERTHREAD(clock) \
34 (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0) 34 (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0)
35#define CPUCLOCK_PID_MASK 7 35
36#define CPUCLOCK_PERTHREAD_MASK 4 36#define CPUCLOCK_PERTHREAD_MASK 4
37#define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK) 37#define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK)
38#define CPUCLOCK_CLOCK_MASK 3 38#define CPUCLOCK_CLOCK_MASK 3
@@ -48,6 +48,9 @@ struct cpu_timer_list {
48#define MAKE_THREAD_CPUCLOCK(tid, clock) \ 48#define MAKE_THREAD_CPUCLOCK(tid, clock) \
49 MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK) 49 MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK)
50 50
51#define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD)
52#define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3))
53
51/* POSIX.1b interval timer structure. */ 54/* POSIX.1b interval timer structure. */
52struct k_itimer { 55struct k_itimer {
53 struct list_head list; /* free/ allocate list */ 56 struct list_head list; /* free/ allocate list */
@@ -100,6 +103,7 @@ struct k_clock {
100}; 103};
101 104
102extern struct k_clock clock_posix_cpu; 105extern struct k_clock clock_posix_cpu;
106extern struct k_clock clock_posix_dynamic;
103 107
104void posix_timers_register_clock(const clockid_t clock_id, struct k_clock *new_clock); 108void posix_timers_register_clock(const clockid_t clock_id, struct k_clock *new_clock);
105 109