1STRUCT HRTIMER(9) Driver Basics STRUCT HRTIMER(9)
2
3
4
6 struct_hrtimer - the basic hrtimer structure
7
9 struct hrtimer {
10 struct timerqueue_node node;
11 ktime_t _softexpires;
12 enum hrtimer_restart (* function) (struct hrtimer *);
13 struct hrtimer_clock_base * base;
14 unsigned long state;
15 #ifdef CONFIG_TIMER_STATS
16 int start_pid;
17 void * start_site;
18 char start_comm[16];
19 #endif
20 };
21
23 node
24 timerqueue node, which also manages node.expires, the absolute
25 expiry time in the hrtimers internal representation. The time is
26 related to the clock on which the timer is based. Is setup by
27 adding slack to the _softexpires value. For non range timers
28 identical to _softexpires.
29
30 _softexpires
31 the absolute earliest expiry time of the hrtimer. The time which
32 was given as expiry time when the timer was armed.
33
34 function
35 timer expiry callback function
36
37 base
38 pointer to the timer base (per cpu and per clock)
39
40 state
41 state information (See bit values above)
42
43 start_pid
44 timer statistics field to store the pid of the task which started
45 the timer
46
47 start_site
48 timer statistics field to store the site where the timer was
49 started
50
51 start_comm[16]
52 timer statistics field to store the name of the process which
53 started the timer
54
56 The hrtimer structure must be initialized by hrtimer_init
57
59Kernel Hackers Manual 3.10 June 2019 STRUCT HRTIMER(9)