aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/core.h
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-01-09 02:27:00 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-12 16:24:31 -0500
commit2f55c43788df7358be8c6e78ae2a3d3268e7afb6 (patch)
treeae5cb5fd5124ab1323156bc19fae2bba3c6e9dc5 /net/tipc/core.h
parent6b8326ed14683f641e1c4149197f23a48c7cee36 (diff)
tipc: remove unnecessary wrapper functions of kernel timer APIs
Not only some wrapper function like k_term_timer() is empty, but also some others including k_start_timer() and k_cancel_timer() don't return back any value to its caller, what's more, there is no any component in the kernel world to do such thing. Therefore, these timer interfaces defined in tipc module should be purged. Signed-off-by: Ying Xue <ying.xue@windriver.com> Tested-by: Tero Aho <Tero.Aho@coriant.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r--net/tipc/core.h67
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 */
112typedef 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 */
122static 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 */
141static 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 */
156static 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 */
172static 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