History

treewide: Switch/rename to timer_delete[_sync]()

timer_delete[_sync]() replaces del_timer[_sync](). Convert the whole tree over and remove the historical wrapper inlines. Conversion was done with coccinelle plus manual fixups where necessary.

Thomas Gleixner committed 1 year ago

Commit 8fa72921 parent a8662bc787 files · +1613 −1648Browse files

Showing the changes to kernel/workqueue.c (1 of 787 files). Show all

Unified · Split

kernel/workqueue.c+7−7
@@ -2057,11 +2057,11 @@ static int try_to_grab_pending(struct work_struct *work, u32 cflags, · 2056 unmodified lines
20572057 struct delayed_work *dwork = to_delayed_work(work);
20582058
20592059 /*
2060− * dwork->timer is irqsafe. If del_timer() fails, it's
2060+ * dwork->timer is irqsafe. If timer_delete() fails, it's
20612061 * guaranteed that the timer is not queued anywhere and not
20622062 * running on the local CPU.
20632063 */
2064− if (likely(del_timer(&dwork->timer)))
2064+ if (likely(timer_delete(&dwork->timer)))
20652065 return 1;
20662066 }
20672067
@@ -3069,7 +3069,7 @@ restart: · 1001 unmodified lines
30693069 break;
30703070 }
30713071
3072− del_timer_sync(&pool->mayday_timer);
3072+ timer_delete_sync(&pool->mayday_timer);
30733073 raw_spin_lock_irq(&pool->lock);
30743074 /*
30753075 * This is necessary even after a new worker was just successfully
@@ -4281,7 +4281,7 @@ EXPORT_SYMBOL_GPL(flush_work); · 1205 unmodified lines
42814281 bool flush_delayed_work(struct delayed_work *dwork)
42824282 {
42834283 local_irq_disable();
4284− if (del_timer_sync(&dwork->timer))
4284+ if (timer_delete_sync(&dwork->timer))
42854285 __queue_work(dwork->cpu, dwork->wq, &dwork->work);
42864286 local_irq_enable();
42874287 return flush_work(&dwork->work);
@@ -4984,9 +4984,9 @@ static void put_unbound_pool(struct worker_pool *pool) · 696 unmodified lines
49844984 reap_dying_workers(&cull_list);
49854985
49864986 /* shut down the timers */
4987− del_timer_sync(&pool->idle_timer);
4987+ timer_delete_sync(&pool->idle_timer);
49884988 cancel_work_sync(&pool->idle_cull_work);
4989− del_timer_sync(&pool->mayday_timer);
4989+ timer_delete_sync(&pool->mayday_timer);
49904990
49914991 /* RCU protected to allow dereferences from get_work_pool() */
49924992 call_rcu(&pool->rcu, rcu_free_pool);
@@ -7637,7 +7637,7 @@ notrace void wq_watchdog_touch(int cpu) · 2644 unmodified lines
76377637 static void wq_watchdog_set_thresh(unsigned long thresh)
76387638 {
76397639 wq_watchdog_thresh = 0;
7640− del_timer_sync(&wq_watchdog_timer);
7640+ timer_delete_sync(&wq_watchdog_timer);
76417641
76427642 if (thresh) {
76437643 wq_watchdog_thresh = thresh;

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