At least for 2.1.xx, use the *_timer function family as defined in kernel/sched.c.
The "Linux Internals" book (not quite recommanded, better than nothing from a quick glance) mentioens only these functions, but I see other functions with interesting names: mod_timer which seems to change an existing timer in-place detach_timer which seems to do what del_timer does (actually it's used by del_timer) without clearing the timer_list 'next' and 'prev'. There are a few interesting comments in include/linux/timer.h which describe a few more functions. One thing I learned from the book is that when you call add_timer, you specify the absolut time in jiffies (i.e. for one sec say 'jiffies + (1*HZ)')
|