Linux nanosleep investigation.

Andrea Arcangeli andrea@suse.de
Wed Feb 16 12:36:00 GMT 2000


On Tue, 15 Feb 2000, Kaz Kylheku wrote:

>timespec when the thread should wake up; but nanosleep consistently causes it
>to wake up one jiffy later than that time. With pthread_cond_timedwait,

That's wrong. It causes it to wakeup in mean half jiffy. Sometime zero
jiffy after, some time 1 jiffy after.

>[..] this
>program will wake up every delta period in a predictable way.

What's the problem if it doesn't wakeup with a nanosecond
precision? That's my whole point.

>This won't work properly if the sleep arbitrarily extends the delta by a whole
>clock tick!

What won't work properly? Are you going to burn a CDROM, your videocard,
your nic, or whatever?

Andrea




More information about the Libc-alpha mailing list