Re: nanosleep with small value

Dag Nygren
2005-11-17T19:11:22Z

> On 11/17/05, Dag Nygren <dag@newtech.fi> wrote:

> > The man page for nanosleep saya that times under 2 us are implemented
> > by a busywait and this is why I expected it to work.
>
> Update your manpages. You're depending on 2.4 behavior in a 2.6 kernel.

You are right. The system is one I have upgraded piece by piece and the
manpages
weren't upgraded.

But what is the point of having a nanosleep() in that case when you could do
just fine with usleep() ?

> > OK, in that case the manpage should be changed. And an alternative
> > has to be worked out by me ;-).
>
> My man-pages are quite clear on what nanosleep() does. Nothing needs
> to be changed there.
>
> Alternative wise, I'm not sure, but you might want to look into the
> HRT stuff that's going on in Ingo's -RT tree. I don't know if / what
> changes have been made to sys_nanosleep(), but low-latency is most
> likely to occur there.

I will look into that.
Quite annoying that software that worked just fine in 2.4 doesn't
work in 2.6.

What does POSIX say about nanosleep()?

Dag