Root/
1 | #ifndef _LINUX_TIMERQUEUE_H |
2 | #define _LINUX_TIMERQUEUE_H |
3 | |
4 | #include <linux/rbtree.h> |
5 | #include <linux/ktime.h> |
6 | |
7 | |
8 | struct timerqueue_node { |
9 | struct rb_node node; |
10 | ktime_t expires; |
11 | }; |
12 | |
13 | struct timerqueue_head { |
14 | struct rb_root head; |
15 | struct timerqueue_node *next; |
16 | }; |
17 | |
18 | |
19 | extern void timerqueue_add(struct timerqueue_head *head, |
20 | struct timerqueue_node *node); |
21 | extern void timerqueue_del(struct timerqueue_head *head, |
22 | struct timerqueue_node *node); |
23 | extern struct timerqueue_node *timerqueue_iterate_next( |
24 | struct timerqueue_node *node); |
25 | |
26 | /** |
27 | * timerqueue_getnext - Returns the timer with the earliest expiration time |
28 | * |
29 | * @head: head of timerqueue |
30 | * |
31 | * Returns a pointer to the timer node that has the |
32 | * earliest expiration time. |
33 | */ |
34 | static inline |
35 | struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) |
36 | { |
37 | return head->next; |
38 | } |
39 | |
40 | static inline void timerqueue_init(struct timerqueue_node *node) |
41 | { |
42 | rb_init_node(&node->node); |
43 | } |
44 | |
45 | static inline void timerqueue_init_head(struct timerqueue_head *head) |
46 | { |
47 | head->head = RB_ROOT; |
48 | head->next = NULL; |
49 | } |
50 | #endif /* _LINUX_TIMERQUEUE_H */ |
51 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9