Hi, all.
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).
to implement a exact delay time. After changing the defined HZ as a 1000
,  I'll assign a value which is a 125msec or other msecs to the variable
jif_delay, like following.
-------------------------------------------------------
inline void DelayExecution(void){
        int jif_delay = 125;

        unsigned long j = jiffies + jif_delay;
        current->timeout = j;
        current->state = TASK_INTERRUPTIBLE;
        schedule();
        current->timeout = 0; /* reset the timeout */
}
-------------------------------------------------------
It's suitable or adaptable in the X86 system (in my case, pentium
system)?  or Is there any problem when I changed the defined HZ. I need
you , linux guru's  comments and helps.
Please help me..I'm waiting for the comments.

--
Sook Young Kim
E-mail: [EMAIL PROTECTED]
        [EMAIL PROTECTED]

Reply via email to