History

timers: Rename timerlist infrastructure to timerqueue

Thomas pointed out a namespace collision between the new timerlist infrastructure I introduced and the existing timer_list.c So to avoid confusion, I've renamed the timerlist infrastructure to timerqueue.

John Stultz committed 15 years ago

Commit 1f5a2471 parent 87de5ac4 files · +58 −58Browse files

Showing the changes to include/linux/timerqueue.h (1 of 4 files). Show all

Unified · Split

include/linux/timerqueue.h+37−0
@@ -0,0 +1,37 @@
1#ifndef _LINUX_TIMERQUEUE_H
2#define _LINUX_TIMERQUEUE_H
3
4#include <linux/rbtree.h>
5#include <linux/ktime.h>
6
7
8struct timerqueue_node {
9 struct rb_node node;
10 ktime_t expires;
11};
12
13struct timerqueue_head {
14 struct rb_root head;
15 struct timerqueue_node *next;
16};
17
18
19extern void timerqueue_add(struct timerqueue_head *head,
20 struct timerqueue_node *node);
21extern void timerqueue_del(struct timerqueue_head *head,
22 struct timerqueue_node *node);
23extern struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head);
24extern struct timerqueue_node *timerqueue_iterate_next(
25 struct timerqueue_node *node);
26
27static inline void timerqueue_init(struct timerqueue_node *node)
28{
29 RB_CLEAR_NODE(&node->node);
30}
31
32static inline void timerqueue_init_head(struct timerqueue_head *head)
33{
34 head->head = RB_ROOT;
35 head->next = NULL;
36}
37#endif /* _LINUX_TIMERQUEUE_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t