[Asterisk-Dev] what's the value of a jiffie in zaptel driver ?
Derek Smithies
derek at indranet.co.nz
Mon Nov 22 02:25:49 MST 2004
Hi,
What happens if the code below is used on a box with jiffies set to 512?
Which means that the code below has made excesive use of magic numbers.
There is a define, HZ which is the number of jiffies per second in the
kernel.
You can set up the time to wait, as some fraction of the HZ define.
Derek.
=======================
On Mon, 22 Nov 2004, Dinesh Nair wrote:
> On 22/11/2004 15:42 Steven Critchfield said the following:
> > I'm going to make a quick, unverified guess. It should be the one
> > defined in the linux kernel. Should be 100.
>
> which would mean that the code below in wcfxs_proslic_manual_calibrate() is
> waiting for 800ms.
>
> origjiffies=jiffies;
> while( wcfxs_getreg(wc,card,96)!=0 ){
> if((jiffies-origjiffies)>80)
> return -1;
> }
>
> which seems rather long doesn't it ?
>
>
>
>
--
Derek Smithies Ph.D. This PC runs pine on linux for email
IndraNet Technologies Ltd. If you find a virus apparently from me, it has
Email: derek at indranet.co.nz forged the e-mail headers on someone else's machine
ph +64 3 365 6485 Please do not notify me when (apparently) receiving a
Web: http://www.indranet-technologies.com/ windows virus from me......
More information about the asterisk-dev
mailing list