Commit 367ed4e3 authored by Ingo Molnar's avatar Ingo Molnar Committed by Thomas Gleixner
Browse files

treewide, timers: Rename try_to_del_timer_sync() as timer_delete_sync_try()



Move this API to the canonical timer_*() namespace.

Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250507175338.672442-9-mingo@kernel.org
parent 751e6a39
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -864,7 +864,7 @@ void lapic_offline(void)
	__vector_cleanup(cl, false);

	irq_matrix_offline(vector_matrix);
	WARN_ON_ONCE(try_to_del_timer_sync(&cl->timer) < 0);
	WARN_ON_ONCE(timer_delete_sync_try(&cl->timer) < 0);
	WARN_ON_ONCE(!hlist_empty(&cl->head));

	unlock_vector_lock();
+2 −2
Original line number Diff line number Diff line
@@ -1311,9 +1311,9 @@ static void __cold try_to_generate_entropy(void)
	while (!crng_ready() && !signal_pending(current)) {
		/*
		 * Check !timer_pending() and then ensure that any previous callback has finished
		 * executing by checking try_to_del_timer_sync(), before queueing the next one.
		 * executing by checking timer_delete_sync_try(), before queueing the next one.
		 */
		if (!timer_pending(&stack->timer) && try_to_del_timer_sync(&stack->timer) >= 0) {
		if (!timer_pending(&stack->timer) && timer_delete_sync_try(&stack->timer) >= 0) {
			struct cpumask timer_cpus;
			unsigned int num_cpus;

+1 −1
Original line number Diff line number Diff line
@@ -564,7 +564,7 @@ void imsic_state_offline(void)
	struct imsic_local_priv *lpriv = this_cpu_ptr(imsic->lpriv);

	raw_spin_lock_irqsave(&lpriv->lock, flags);
	WARN_ON_ONCE(try_to_del_timer_sync(&lpriv->timer) < 0);
	WARN_ON_ONCE(timer_delete_sync_try(&lpriv->timer) < 0);
	raw_spin_unlock_irqrestore(&lpriv->lock, flags);
#endif
}
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ extern void add_timer(struct timer_list *timer);
extern void add_timer_local(struct timer_list *timer);
extern void add_timer_global(struct timer_list *timer);

extern int try_to_del_timer_sync(struct timer_list *timer);
extern int timer_delete_sync_try(struct timer_list *timer);
extern int timer_delete_sync(struct timer_list *timer);
extern int timer_delete(struct timer_list *timer);
extern int timer_shutdown_sync(struct timer_list *timer);
+3 −3
Original line number Diff line number Diff line
@@ -1511,7 +1511,7 @@ static int __try_to_del_timer_sync(struct timer_list *timer, bool shutdown)
}

/**
 * try_to_del_timer_sync - Try to deactivate a timer
 * timer_delete_sync_try - Try to deactivate a timer
 * @timer:	Timer to deactivate
 *
 * This function tries to deactivate a timer. On success the timer is not
@@ -1526,11 +1526,11 @@ static int __try_to_del_timer_sync(struct timer_list *timer, bool shutdown)
 * * %1  - The timer was pending and deactivated
 * * %-1 - The timer callback function is running on a different CPU
 */
int try_to_del_timer_sync(struct timer_list *timer)
int timer_delete_sync_try(struct timer_list *timer)
{
	return __try_to_del_timer_sync(timer, false);
}
EXPORT_SYMBOL(try_to_del_timer_sync);
EXPORT_SYMBOL(timer_delete_sync_try);

#ifdef CONFIG_PREEMPT_RT
static __init void timer_base_init_expiry_lock(struct timer_base *base)
Loading