Re: [linux-audio-dev] Patches to compile MidiShare on kernel 2.6

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Patches to compile MidiShare on kernel 2.6
From: Lee Revell (rlrevell_AT_joe-job.com)
Date: Mon Jul 26 2004 - 04:55:30 EEST


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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Jul 26 2004 - 05:00:14 EEST