[lkml]   [1999]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Scheduling inside bottom-half
On Thu, 30 Sep 1999, Linux Lists wrote:

> Where can I find more info about how to use kernel timers ??

Take a look at the struct timer_list in include/linux/timer.h (ignore the
"old" timers). Then look through a kernel driver which uses them and see
how they are used (a good example is drivers/net/tulip.c; grep for timer).
It works somewhat like a signal handler, in that you have a function
returning void that is run asynchronously when the signal is raised (in
this case, the timer expires). Instead of taking the signal as the
argument, the function will take a value you specify in the timer_list.
Just be mindful of how you allocate the struct and care for it; it is not
copied when queued, so accessing it/freeing it will break you. Also, the
timer runs at interrupt-time as well, so you can't sleep/etc there, either.

# bryan at terran dot org

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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