lkml.org 
[lkml]   [2014]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 2/7] atm: replace del_timer by del_timer_sync
From
Date
On Wed, 2014-03-26 at 23:02 +0100, Thomas Gleixner wrote:

> That's why you need del_timer_sync() it waits for the timer handler to
> complete and then removes it.

Interesting... So maybe some comment is stale ?


diff --git a/kernel/timer.c b/kernel/timer.c
index accfd241b9e5..c948fa2fc065 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1011,10 +1011,10 @@ EXPORT_SYMBOL(try_to_del_timer_sync);
* the timer it also makes sure the handler has finished executing on other
* CPUs.
*
- * Synchronization rules: Callers must prevent restarting of the timer,
- * otherwise this function is meaningless. It must not be called from
- * interrupt contexts unless the timer is an irqsafe one. The caller must
- * not hold locks which would prevent completion of the timer's
+ * Synchronization rules:
+ * It must not be called from interrupt contexts unless the timer is an
+ * irqsafe one.
+ * The caller must not hold locks which would prevent completion of the timer's
* handler. The timer's handler must not call add_timer_on(). Upon exit the
* timer is not queued and the handler is not running on any CPU.
*



\
 
 \ /
  Last update: 2014-03-27 00:01    [W:0.076 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site