On Sun, 2004-07-25 at 21:31, Albert Graef wrote:
Oops, looks like the patch isn't that perfect yet.
:(
Quick fix: s/expires = 1/expires = jiffies+1/
I'm still looking at the timing stuff, though (hard to find your way
when most docs still seem to be for kernel 2.4). Can anyone with some
kernel expertise tell me the recommended way to implement a timer in
kernel space which is called HZ times per sec?
Check linux/timer.h. Here is the short version (from Robert Love's
book):
struct timer_list my_timer;
init_timer(&my_timer);
my_timer.expires = jiffies + delay;
my_timer.data=0;
my_timer.function = my_function;
add_timer(&my_timer);
The major change from 2.4 to 2.6 was that HZ=1000 on x86 now, previously
it was 100.
HTH,
Lee