This source file includes following definitions.
- tick_cancel_sched_timer
- __tick_broadcast_oneshot_control
1
2 #ifndef _TICK_SCHED_H
3 #define _TICK_SCHED_H
4
5 #include <linux/hrtimer.h>
6
7 enum tick_device_mode {
8 TICKDEV_MODE_PERIODIC,
9 TICKDEV_MODE_ONESHOT,
10 };
11
12 struct tick_device {
13 struct clock_event_device *evtdev;
14 enum tick_device_mode mode;
15 };
16
17 enum tick_nohz_mode {
18 NOHZ_MODE_INACTIVE,
19 NOHZ_MODE_LOWRES,
20 NOHZ_MODE_HIGHRES,
21 };
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 struct tick_sched {
54 struct hrtimer sched_timer;
55 unsigned long check_clocks;
56 enum tick_nohz_mode nohz_mode;
57
58 unsigned int inidle : 1;
59 unsigned int tick_stopped : 1;
60 unsigned int idle_active : 1;
61 unsigned int do_timer_last : 1;
62 unsigned int got_idle_tick : 1;
63
64 ktime_t last_tick;
65 ktime_t next_tick;
66 unsigned long idle_jiffies;
67 unsigned long idle_calls;
68 unsigned long idle_sleeps;
69 ktime_t idle_entrytime;
70 ktime_t idle_waketime;
71 ktime_t idle_exittime;
72 ktime_t idle_sleeptime;
73 ktime_t iowait_sleeptime;
74 unsigned long last_jiffies;
75 u64 timer_expires;
76 u64 timer_expires_base;
77 u64 next_timer;
78 ktime_t idle_expires;
79 atomic_t tick_dep_mask;
80 };
81
82 extern struct tick_sched *tick_get_tick_sched(int cpu);
83
84 extern void tick_setup_sched_timer(void);
85 #if defined CONFIG_NO_HZ_COMMON || defined CONFIG_HIGH_RES_TIMERS
86 extern void tick_cancel_sched_timer(int cpu);
87 #else
88 static inline void tick_cancel_sched_timer(int cpu) { }
89 #endif
90
91 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
92 extern int __tick_broadcast_oneshot_control(enum tick_broadcast_state state);
93 #else
94 static inline int
95 __tick_broadcast_oneshot_control(enum tick_broadcast_state state)
96 {
97 return -EBUSY;
98 }
99 #endif
100
101 #endif