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
2057 struct delayed_work *dwork = to_delayed_work(work);2057 struct delayed_work *dwork = to_delayed_work(work);
2058 2058
2059 /*2059 /*
2060 * dwork->timer is irqsafe. If del_timer() fails, it's2060 * dwork->timer is irqsafe. If timer_delete() fails, it's
2061 * guaranteed that the timer is not queued anywhere and not2061 * guaranteed that the timer is not queued anywhere and not
2062 * running on the local CPU.2062 * running on the local CPU.
2063 */2063 */
2064 if (likely(del_timer(&dwork->timer)))2064 if (likely(timer_delete(&dwork->timer)))
2065 return 1;2065 return 1;
2066 }2066 }
2067 2067
@@ -3069,7 +3069,7 @@ restart: · 1001 unmodified lines
3069 break;3069 break;
3070 }3070 }
3071 3071
3072 del_timer_sync(&pool->mayday_timer);3072 timer_delete_sync(&pool->mayday_timer);
3073 raw_spin_lock_irq(&pool->lock);3073 raw_spin_lock_irq(&pool->lock);
3074 /*3074 /*
3075 * This is necessary even after a new worker was just successfully3075 * This is necessary even after a new worker was just successfully
@@ -4281,7 +4281,7 @@ EXPORT_SYMBOL_GPL(flush_work); · 1205 unmodified lines
4281bool flush_delayed_work(struct delayed_work *dwork)4281bool flush_delayed_work(struct delayed_work *dwork)
4282{4282{
4283 local_irq_disable();4283 local_irq_disable();
4284 if (del_timer_sync(&dwork->timer))4284 if (timer_delete_sync(&dwork->timer))
4285 __queue_work(dwork->cpu, dwork->wq, &dwork->work);4285 __queue_work(dwork->cpu, dwork->wq, &dwork->work);
4286 local_irq_enable();4286 local_irq_enable();
4287 return flush_work(&dwork->work);4287 return flush_work(&dwork->work);
@@ -4984,9 +4984,9 @@ static void put_unbound_pool(struct worker_pool *pool) · 696 unmodified lines
4984 reap_dying_workers(&cull_list);4984 reap_dying_workers(&cull_list);
4985 4985
4986 /* shut down the timers */4986 /* shut down the timers */
4987 del_timer_sync(&pool->idle_timer);4987 timer_delete_sync(&pool->idle_timer);
4988 cancel_work_sync(&pool->idle_cull_work);4988 cancel_work_sync(&pool->idle_cull_work);
4989 del_timer_sync(&pool->mayday_timer);4989 timer_delete_sync(&pool->mayday_timer);
4990 4990
4991 /* RCU protected to allow dereferences from get_work_pool() */4991 /* RCU protected to allow dereferences from get_work_pool() */
4992 call_rcu(&pool->rcu, rcu_free_pool);4992 call_rcu(&pool->rcu, rcu_free_pool);
@@ -7637,7 +7637,7 @@ notrace void wq_watchdog_touch(int cpu) · 2644 unmodified lines
7637static void wq_watchdog_set_thresh(unsigned long thresh)7637static void wq_watchdog_set_thresh(unsigned long thresh)
7638{7638{
7639 wq_watchdog_thresh = 0;7639 wq_watchdog_thresh = 0;
7640 del_timer_sync(&wq_watchdog_timer);7640 timer_delete_sync(&wq_watchdog_timer);
7641 7641
7642 if (thresh) {7642 if (thresh) {
7643 wq_watchdog_thresh = thresh;7643 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