public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Deleting timers
@ 2009-06-26 19:50 Alan Stern
  2009-07-02  5:22 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Stern @ 2009-06-26 19:50 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Kernel development list

Thomas:

The major difference -- in fact, almost the only difference -- between
del_timer() and try_to_del_timer_sync() is that try_to_del_timer_sync
returns a special code (-1) if the timer couldn't be deleted because it
is currently running, whereas del_timer doesn't check this.

Furthermore, the "_sync" in the name suggests that 
try_to_del_timer_sync will wait until a running timer has finished, 
which it clearly does not do.

Despite these facts, the kerneldoc for try_to_del_timer_sync states 
that it must not be called in interrupt context.  Why not?  Isn't that
advice simply wrong?

With this in mind, would there be any objection if I renamed it to 
try_to_del_timer(), removed the comment forbidding it to be used in 
interrupt context, and made it available even on non-SMP builds?

Alan Stern

P.S.: The only other difference is that del_timer calls
timer_stats_timer_clear_start_info.  Why doesn't try_to_del_timer_sync
do the same thing?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-02 16:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-26 19:50 Deleting timers Alan Stern
2009-07-02  5:22 ` Andrew Morton
2009-07-02 14:37   ` Alan Stern
2009-07-02 16:02     ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox