karl wrote:

> Hello Jens,
> 
> If I am not to wrong I think nanosleep() and using one if the two realtime
> scheduling polices SCHED_RR or SCHED_FIFO,
> will sleep a normal kernel with highest precision, I think.

some of it is right but..
first.
check out man nanaosleep.

second.
nanosleep perform a busy wait when used in standard Linux if wait time 
is less then 2ms and SCHED_RR or SCHED_FIFO is used (you have to bee 
root to chose these scedular)

if used in RTLinux nanosleep and usleep does not perform a busy wait 
but suspend the calling task. nanosleep is implemented using 
pthread_suspend_np(). So in RTLinux its goes the POSIX way.
Linux does not follow the POSIX. (Read bugs in man nanosleep)

  Sorry, but but there is no funktion that can perform a sleep less 
then 1ms in Linux. the only method is busy wait if wait less then 2ms.

Anders Gnistrup


> 
> Regards,
> 
> Karl Janmar
> 
> Jens Michaelsen wrote:
> 
> 
>>Does one of the books describe how to udelay a thread?
>>Tryed usleep() for non-rt which ends up with milli seconds :(
>>Once there was a extension to linux that should support udelays.
>>Where is it gone??
>>
>>Jens Michaelsen
>>
>>[EMAIL PROTECTED] schrieb am 31.08.01:
>>
>>>Jennings, Richard R wrote:
>>>
>>>
>>>>Can anyone suggest a good book on practical use of Posix threads
>>>>(pthreads) with example code, etc.  All the books I have found seem
>>>>to be out of date or have not so good reviews.
>>>>
>>>
>>>I got a pure bible.
>>>
>>>Programming with POSIX Threads
>>>David R. Butenhof
>>>1997
>>>Addison-Wesley Professional Computing Series.
>>>
>>>Anders Gnistrup
>>>
>>>
>>>
>>>>Thanks,
>>>>Rich
>>>>
>>>>-- [rtl] ---
>>>>To unsubscribe:
>>>>echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
>>>>echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
>>>>--
>>>>For more information on Real-Time Linux see:
>>>>http://www.rtlinux.org/
>>>>
>>>>
>>>>.
>>>>
>>>>
>>>>
>>>
>>>-- [rtl] ---
>>>To unsubscribe:
>>>echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
>>>echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
>>>--
>>>For more information on Real-Time Linux see:
>>>http://www.rtlinux.org/
>>>
>>>
>>______________________________________________________________________________
>>Sie surfen im Internet statt im Meer? Selbst schuld!
>>Auf zum Strand: http://lastminute.de/?PP=1-0-100-105-1
>>
>>-- [rtl] ---
>>To unsubscribe:
>>echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
>>echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
>>--
>>For more information on Real-Time Linux see:
>>http://www.rtlinux.org/
>>
> 
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/
> 
> 
> .
> 
> 


-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to