The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Shawn Bohrer <shawn.bohrer@gmail.com>
Subject: Re: [patch 2/2] fix compiler warning and optimize the non-blocking path
Date: Wed, 19 Jan 2011 15:54:51 -0800	[thread overview]
Message-ID: <20110119155451.5a2b7636.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1101191547370.31086@davide-lnx1>

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!

      reply	other threads:[~2011-01-19 23:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-15 19:43 [patch 2/2] fix compiler warning and optimize the non-blocking path Davide Libenzi
2011-01-19 22:29 ` Andrew Morton
2011-01-19 23:49   ` Davide Libenzi
2011-01-19 23:54     ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110119155451.5a2b7636.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawn.bohrer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox