[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <456436CA.7050809@tls.msk.ru>
Date: Wed, 22 Nov 2006 14:38:50 +0300
From: Michael Tokarev <mjt@....msk.ru>
To: Ulrich Drepper <drepper@...hat.com>
CC: Jeff Garzik <jeff@...zik.org>,
Evgeniy Polyakov <johnpol@....mipt.ru>,
David Miller <davem@...emloft.net>,
Andrew Morton <akpm@...l.org>, netdev <netdev@...r.kernel.org>,
Zach Brown <zach.brown@...cle.com>,
Christoph Hellwig <hch@...radead.org>,
Chase Venters <chase.venters@...entec.com>,
Johann Borck <johann.borck@...sedata.com>,
linux-kernel@...r.kernel.org, Alexander Viro <aviro@...hat.com>
Subject: Re: [take24 0/6] kevent: Generic event handling mechanism.
Ulrich Drepper wrote:
> Jeff Garzik wrote:
>> I think we have lived with relative timeouts for so long, it would be
>> unusual to change now. select(2), poll(2), epoll_wait(2) all take
>> relative timeouts.
>
> I'm not talking about always using absolute timeouts.
>
> I'm saying the timeout parameter should be a struct timespec* and then
> the flags word could have a flag meaning "this is an absolute timeout".
> I.e., enable both uses,, even make relative timeouts the default. This
> is what the modern POSIX interfaces do, too, see clock_nanosleep.
Can't the argument be something like u64 instead of struct timespec,
regardless of this discussion (relative vs absolute)?
Compare:
void mysleep(int msec) {
struct timeval tv;
tv.tv_sec = msec/1000;
tv.tv_usec = msec%1000;
select(0,0,0,0,&tv);
}
with
void mysleep(int msec) {
poll(0, 0, msec*SOME_TIME_SCALE_VALUE);
}
That to say: struct time{spec,val,whatever} is more difficult to use than
plain numbers.
But yes... existing struct timespec has an advantage of being already existed.
Oh well.
/mjt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists