diff options
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r-- | net/tipc/core.h | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h index 56fe4229fc5e..d57068961d4c 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h | |||
@@ -107,73 +107,6 @@ void tipc_unregister_sysctl(void); | |||
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | /* | 109 | /* |
110 | * TIPC timer code | ||
111 | */ | ||
112 | typedef void (*Handler) (unsigned long); | ||
113 | |||
114 | /** | ||
115 | * k_init_timer - initialize a timer | ||
116 | * @timer: pointer to timer structure | ||
117 | * @routine: pointer to routine to invoke when timer expires | ||
118 | * @argument: value to pass to routine when timer expires | ||
119 | * | ||
120 | * Timer must be initialized before use (and terminated when no longer needed). | ||
121 | */ | ||
122 | static inline void k_init_timer(struct timer_list *timer, Handler routine, | ||
123 | unsigned long argument) | ||
124 | { | ||
125 | setup_timer(timer, routine, argument); | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * k_start_timer - start a timer | ||
130 | * @timer: pointer to timer structure | ||
131 | * @msec: time to delay (in ms) | ||
132 | * | ||
133 | * Schedules a previously initialized timer for later execution. | ||
134 | * If timer is already running, the new timeout overrides the previous request. | ||
135 | * | ||
136 | * To ensure the timer doesn't expire before the specified delay elapses, | ||
137 | * the amount of delay is rounded up when converting to the jiffies | ||
138 | * then an additional jiffy is added to account for the fact that | ||
139 | * the starting time may be in the middle of the current jiffy. | ||
140 | */ | ||
141 | static inline void k_start_timer(struct timer_list *timer, unsigned long msec) | ||
142 | { | ||
143 | mod_timer(timer, jiffies + msecs_to_jiffies(msec) + 1); | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * k_cancel_timer - cancel a timer | ||
148 | * @timer: pointer to timer structure | ||
149 | * | ||
150 | * Cancels a previously initialized timer. | ||
151 | * Can be called safely even if the timer is already inactive. | ||
152 | * | ||
153 | * WARNING: Must not be called when holding locks required by the timer's | ||
154 | * timeout routine, otherwise deadlock can occur on SMP systems! | ||
155 | */ | ||
156 | static inline void k_cancel_timer(struct timer_list *timer) | ||
157 | { | ||
158 | del_timer_sync(timer); | ||
159 | } | ||
160 | |||
161 | /** | ||
162 | * k_term_timer - terminate a timer | ||
163 | * @timer: pointer to timer structure | ||
164 | * | ||
165 | * Prevents further use of a previously initialized timer. | ||
166 | * | ||
167 | * WARNING: Caller must ensure timer isn't currently running. | ||
168 | * | ||
169 | * (Do not "enhance" this routine to automatically cancel an active timer, | ||
170 | * otherwise deadlock can arise when a timeout routine calls k_term_timer.) | ||
171 | */ | ||
172 | static inline void k_term_timer(struct timer_list *timer) | ||
173 | { | ||
174 | } | ||
175 | |||
176 | /* | ||
177 | * TIPC message buffer code | 110 | * TIPC message buffer code |
178 | * | 111 | * |
179 | * TIPC message buffer headroom reserves space for the worst-case | 112 | * TIPC message buffer headroom reserves space for the worst-case |