What ist the best way to wait n*10ms in a kernel thread? I am porting a non
linux device driver to linux. The main part of the driver sould not be
changed. The driver needs 2 kernel threads. The threads are soft realtime
threads. They call a wait function if they want to sleep. In the moment
I use this to implement the wait function:
void wait_func(int t)
{
unsigned long j;
j=jiffies+t*HZ/100;
while(jiffies<j)
schedule();
}
It works but the Idle task has no chance. So what can I do?
Knud
-----
woehler@ossi.fho-emden.de
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/