On Thu, Mar 19, 2009 at 5:24 AM, Saransh Mittal <[email protected]> wrote:
(cut)
> /* Inside init_module */
> init_timer ( &TimerFunctionTimer );
> TimerFunctionTimer.expires = (jiffies + HZ);
> TimerFunctionTimer.function = timerFunction;
> add_timer( &TimerFunctionTimer );
You could also do something like this:
static void my_timer_f(unsigned long data) {
}
static struct timer_list my_timer = TIMER_INITIALIZER(my_timer_f, 0, 0);
/* Schedule timer. */
mod_timer(&my_timer, jiffies + HZ);
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ