mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tachino Nobuhiro <tachino@open.nm.fujitsu.co.jp>
To: raf@raf.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: bugreport: poll() timeout always takes 10ms too long
Date: Fri, 22 Jun 2001 13:24:50 +0900	[thread overview]
Message-ID: <1yodnnu5.wl@nisaaru.open.nm.fujitsu.co.jp> (raw)
In-Reply-To: <20010622115212.A8681@eccles.raf.org>
In-Reply-To: <20010622115212.A8681@eccles.raf.org>


 Hello,

At Fri, 22 Jun 2001 11:52:12 +1000,
raf@raf.org wrote:
> 
> [1.] One line summary of the problem:    
> 
> poll() timeout always takes 10ms too long
> 
> [2.] Full description of the problem/report:
> 
> Select() timeouts work fine. A timeout between 10n-9 and 10n ms times
> out after 10n ms on average. Poll() timeouts between 10n-9 and 10n ms,
> on the other hand, time out after 10(n+1) ms on average. It's always a
> jiffy too long. This means it's impossible to set a 10ms timeout using
> poll() even though it's possible using select(). The programs and their
> output below [6] demonstrate this. The same behavious occurs with
> linux-2.2 and linux-2.4.


  I think this is correct behavior. The Single UNIX Specification
describes about the timeout parameter of poll() as follows,

	If none of the defined events have occurred on any selected
	file descriptor, poll() waits at least timeout milliseconds
	for an event to occur on any of the selected file descriptors.

  On the other hand, select(),

	If the specified condition is false for all of the specified
	file descriptors, select() blocks, up to the specified timeout
	interval, until the specified condition is true for at least
	one of the specified file descriptors.

  reply	other threads:[~2001-06-22  4:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-22  1:52 raf
2001-06-22  4:24 ` Tachino Nobuhiro [this message]
2001-06-23  0:45   ` raf

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=1yodnnu5.wl@nisaaru.open.nm.fujitsu.co.jp \
    --to=tachino@open.nm.fujitsu.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raf@raf.org \
    /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

all inboxes | Powered by JetHome®