History

timers: Rename del_timer() to timer_delete()

The timer related functions do not have a strict timer_ prefixed namespace which is really annoying. Rename del_timer() to timer_delete() and provide del_timer() as a wrapper. Document that del_timer() is not for new code.

Thomas Gleixner committed 3 years ago

Commit bb663f01 parent 9b13df32 files · +17 −4Browse files

Showing the changes to kernel/time/timer.c (1 of 2 files). Show all

Unified · Split

kernel/time/timer.c+3−3
@@ -1257,7 +1257,7 @@ void add_timer_on(struct timer_list *timer, int cpu) · 1256 unmodified lines
1257EXPORT_SYMBOL_GPL(add_timer_on);1257EXPORT_SYMBOL_GPL(add_timer_on);
1258 1258
1259/**1259/**
1260 * del_timer - Deactivate a timer.1260 * timer_delete - Deactivate a timer
1261 * @timer: The timer to be deactivated1261 * @timer: The timer to be deactivated
1262 *1262 *
1263 * The function only deactivates a pending timer, but contrary to1263 * The function only deactivates a pending timer, but contrary to
@@ -1270,7 +1270,7 @@ EXPORT_SYMBOL_GPL(add_timer_on); · 6 unmodified lines
1270 * * %0 - The timer was not pending1270 * * %0 - The timer was not pending
1271 * * %1 - The timer was pending and deactivated1271 * * %1 - The timer was pending and deactivated
1272 */1272 */
1273int del_timer(struct timer_list *timer)1273int timer_delete(struct timer_list *timer)
1274{1274{
1275 struct timer_base *base;1275 struct timer_base *base;
1276 unsigned long flags;1276 unsigned long flags;
@@ -1286,7 +1286,7 @@ int del_timer(struct timer_list *timer) · 9 unmodified lines
1286 1286
1287 return ret;1287 return ret;
1288}1288}
1289EXPORT_SYMBOL(del_timer);1289EXPORT_SYMBOL(timer_delete);
1290 1290
1291/**1291/**
1292 * try_to_del_timer_sync - Try to deactivate a timer1292 * try_to_del_timer_sync - Try to deactivate a timer

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t