lkml.org 
[lkml]   [2003]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject
Date
Hi everybody !

I've been developing a kernel module and I needed some timer functions. I
found init_timer() add_timer() del_timer() etc... but I would ask some
questions about them.

1) When I set a timer, it is added to a timer_list chain with add_timer().
If the time is up and the scheduled function is called, should I remove the
timer_list struct from the chain via del_timer() ? Or is it removed
automatically ?

2) How can a module safely removed if it has some running timers ? I have to
call del_timer() in cleanup_module() for each running timer ? And what's the
purpose of the timer_pending function ?

thanks

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.044 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site