Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2000 11:16:57 -0800
From:      "David Schwartz" <davids@webmaster.com>
To:        "Mikhail Teterin" <mi@kot.ne.mediaone.net>, "Warner Losh" <imp@village.org>
Cc:        <hackers@FreeBSD.ORG>
Subject:   RE: kern/13644
Message-ID:  <000001bf669f$94c4ec70$021d85d1@youwant.to>
In-Reply-To: <200001240547.AAA46261@rtfm.newton>

next in thread | previous in thread | raw e-mail | index | archive | help

> =The man pages say exactly:
> =     If timeout is  a non-nil pointer, it specifies  a maximum interval
> =     to wait for the selection to complete.

> =Which doesn't say that it will sleep no more than this. It says that it
> =will wait no longer than this for the selection to complete. It doesn't
> =guarantee  anything,  imho.  It  doesn't guarnatee  that  you  will  be
> =scheduled at any given time.

> Yep.  But that  little, that  I was  told of  implementation, says  that
> the  rounding  up is  there  to  guarantee the  sleep  of  no less  then
> specified. This  is consistent  with my  experiments, which  show steady
> 9-10 milliseconds extra sleeping time.

	The man page is correct and the implementation is correct. The purpose of
the timeout field in select is to specify the longest you want to wait. The
implementation guarantees that it will wait at least that long if it needs
to.

	It's like if I asked my wife to wait for a UPS package to arrive starting
now. And she says, "what's the maximum I need to wait", and I say "4 hours".
She's complying with my request if she waits for at least 4 hours, right?
The term "maximum" refers to the fact that she can stop waiting earlier if
the package arrives. It doesn't mean she can't wait more than 4 hours.

	DS



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000001bf669f$94c4ec70$021d85d1>