Documentation: Remove bogus claim about del_timer_sync()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Nov 2022 20:18:31 +0000 (21:18 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 24 Nov 2022 14:09:10 +0000 (15:09 +0100)
del_timer_sync() does not return the number of times it tried to delete the
timer which rearms itself. It's clearly documented:

 The function returns whether it has deactivated a pending timer or not.

This part of the documentation is from 2003 where del_timer_sync() really
returned the number of deletion attempts for unknown reasons. The code
was rewritten in 2005, but the documentation was not updated.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Link: https://lore.kernel.org/r/20221123201624.452282769@linutronix.de
Documentation/kernel-hacking/locking.rst
Documentation/translations/it_IT/kernel-hacking/locking.rst

index 6805ae6e86e65c5e4bf6d83b4657b986a51e7f66..b26e4a3a9b7e562b339f3debd3f74eb8fca19927 100644 (file)
@@ -1006,8 +1006,7 @@ Another common problem is deleting timers which restart themselves (by
 calling add_timer() at the end of their timer function).
 Because this is a fairly common case which is prone to races, you should
 use del_timer_sync() (``include/linux/timer.h``) to
-handle this case. It returns the number of times the timer had to be
-deleted before we finally stopped it from adding itself back in.
+handle this case.
 
 Locking Speed
 =============
index 51af37f2d621076ea6c174925c940d14754a100e..eddfba806e13413bbbe62e83cf7f3dea5dcfd612 100644 (file)
@@ -1027,9 +1027,7 @@ Un altro problema è l'eliminazione dei temporizzatori che si riavviano
 da soli (chiamando add_timer() alla fine della loro esecuzione).
 Dato che questo è un problema abbastanza comune con una propensione
 alle corse critiche, dovreste usare del_timer_sync()
-(``include/linux/timer.h``) per gestire questo caso. Questa ritorna il
-numero di volte che il temporizzatore è stato interrotto prima che
-fosse in grado di fermarlo senza che si riavviasse.
+(``include/linux/timer.h``) per gestire questo caso.
 
 Velocità della sincronizzazione
 ===============================