Re: nanosleep

H. Peter Anvin (hpa@zytor.com)
14 Apr 2002 13:37:22 -0700


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>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/