SookYoung Kim wrote:

> I find a hint from "Linux Device Driver" how i code delay execution for
> a long time(?).
> For a 130msec sleeping  I coded ,as follow.
> ----------------------------------------------------
> inline void DelayExecution(void ){
>         int jif_delay = 13;
>         unsigned long j = jiffies + jif_delay;
>         current->timeout = j;
>         current->state = TASK_INTERRUPTIBLE;
>         schedule();
>         current->timeout = 0; /* reset the timeout */
> }
> ------------------------------------------------------
> But, what i really wanted is a code for 125 msecs or other msecs  i
> want.
> So I thougt the defined HZ has to be changed as a 1000 (as  you know,
> 100 is a default).

If you change the value of HZ, bad things may happen.

> to implement a exact delay time.

You can't implement an exact delay time. You'll have to live with
whatever delay you get, or switch to using a real-time OS.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to