This source file includes following definitions.
- time_travel_set_time
- time_travel_set_timer_mode
- time_travel_set_timer_expiry
- time_travel_set_timer_interval
- time_travel_set_time
- time_travel_set_timer_mode
- time_travel_set_timer_expiry
- time_travel_set_timer_interval
1
2
3
4
5
6
7 #ifndef __TIMER_INTERNAL_H__
8 #define __TIMER_INTERNAL_H__
9
10 #define TIMER_MULTIPLIER 256
11 #define TIMER_MIN_DELTA 500
12
13 enum time_travel_mode {
14 TT_MODE_OFF,
15 TT_MODE_BASIC,
16 TT_MODE_INFCPU,
17 };
18
19 enum time_travel_timer_mode {
20 TT_TMR_DISABLED,
21 TT_TMR_ONESHOT,
22 TT_TMR_PERIODIC,
23 };
24
25 #ifdef CONFIG_UML_TIME_TRAVEL_SUPPORT
26 extern enum time_travel_mode time_travel_mode;
27 extern unsigned long long time_travel_time;
28 extern enum time_travel_timer_mode time_travel_timer_mode;
29 extern unsigned long long time_travel_timer_expiry;
30 extern unsigned long long time_travel_timer_interval;
31
32 static inline void time_travel_set_time(unsigned long long ns)
33 {
34 time_travel_time = ns;
35 }
36
37 static inline void time_travel_set_timer_mode(enum time_travel_timer_mode mode)
38 {
39 time_travel_timer_mode = mode;
40 }
41
42 static inline void time_travel_set_timer_expiry(unsigned long long expiry)
43 {
44 time_travel_timer_expiry = expiry;
45 }
46
47 static inline void time_travel_set_timer_interval(unsigned long long interval)
48 {
49 time_travel_timer_interval = interval;
50 }
51 #else
52 #define time_travel_mode TT_MODE_OFF
53 #define time_travel_time 0
54 #define time_travel_timer_expiry 0
55 #define time_travel_timer_interval 0
56
57 static inline void time_travel_set_time(unsigned long long ns)
58 {
59 }
60
61 static inline void time_travel_set_timer_mode(enum time_travel_timer_mode mode)
62 {
63 }
64
65 static inline void time_travel_set_timer_expiry(unsigned long long expiry)
66 {
67 }
68
69 static inline void time_travel_set_timer_interval(unsigned long long interval)
70 {
71 }
72
73 #define time_travel_timer_mode TT_TMR_DISABLED
74 #endif
75
76 #endif