lkml.org 
[lkml]   [1999]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectWait in kernel threads
Date
Hello

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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.133 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site