Re: nanosleep

H. Peter Anvin
2002-04-14T20:37:46Z

Followup to: <20020413145306.A29006@ecam.san.rr.com>
By author: andrew may <acmay@acmay.homeip.net>
In newsgroup: linux.dev.kernel
>
> Make all your calls to nanasleep be less than 2ms, and loop through as
> many as you need until you are under 2ms.
>
> Don't do it for too long because you get no other use out of your machine
> while your doing this but it does work.
>

If you want to busy-wait, you might as well do it in userspace (use
RDTSC.)

Maybe a future version of the kernel will have more flexible
scheduling.

-hpa

--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>