lkml.org 
[lkml]   [2011]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/2] fix compiler warning and optimize the non-blocking path
On Wed, 19 Jan 2011 15:49:09 -0800 (PST)
Davide Libenzi <davidel@xmailserver.org> wrote:

> On Wed, 19 Jan 2011, Andrew Morton wrote:
>
> > On Sat, 15 Jan 2011 11:43:45 -0800 (PST)
> > Davide Libenzi <davidel@xmailserver.org> wrote:
> >
> > > +/**
> > > + * ep_poll - Retrieves ready events, and delivers them to the caller supplied
> > > + * event buffer.
> > > + *
> > > + * @ep: Pointer to the eventpoll context.
> > > + * @events: Pointer to the userspace buffer where the ready events should be
> > > + * stored.
> > > + * @maxevents: Size (in terms of number of events) of the caller event buffer.
> > > + * @timeout: Maximum timeout for the ready events fetch operation, in
> > > + * milliseconds. If the @timeout is zero, the function will not block,
> > > + * while if the @timeout is less than zero, the function will block
> > > + * until at least one event has been retrieved (or an error
> > > + * occurred).
> >
> > Ah, that's what timeout<0 means.
> >
> > My `man epoll_wait' says "a timeout of -1 makes epoll_wait() wait
> > indefinitely", whereas the implementation accepts any -ve value.
> >
> > So we lost the ability to later make -[2..MAX_INT] meaningful in some
> > new way. Oh well.
>
> I guess we can throw a -EINVAL if timeout <-1, if you prefer ...
>

Too late!


\
 
 \ /
  Last update: 2011-01-20 00:57    [W:0.035 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site