Re: Add pselect, ppoll system calls.
From: Bernd Petrovitsch
Date: Tue Jun 14 2005 - 09:18:03 EST
On Tue, 2005-06-14 at 16:07 +0200, =?ISO-8859-1?Q?Mattias Engdeg=E5rd?=
wrote:
> >Monotonic clocks are guaranteed to not go backward. A sudden warp 35
> >seconds into the future when you have timers set for 15 and 20
> >seconds into the future is still ugly....
>
> I don't have the POSIX specs handy, but I see no reason we could not let
> it use a warpless monotonic clock.
You have already one - the uptime of the system.
> The problem of timeouts going wild when time is being warped applies
> to syscalls using relative timeouts as well. Even when a relative
> timeout is wanted, it is usually transformed (via gettimeofday or
Doing "Relative timeouts" with "gettimeofday()" is a strategic error.
Specify the timeout und use (the return value of) times(2) for this.
Use "gettimeofday()" and similar just if (and only if) you communicate
with the user (read: that is a pure user interface issue).
Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/