From owner-freebsd-hackers Mon Jan 24 11:17:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from shell.webmaster.com (mail.webmaster.com [209.133.28.73]) by hub.freebsd.org (Postfix) with ESMTP id 7E033159F2 for ; Mon, 24 Jan 2000 11:17:01 -0800 (PST) (envelope-from davids@webmaster.com) Received: from whenever ([209.133.29.2]) by shell.webmaster.com (Post.Office MTA v3.5.3 release 223 ID# 0-12345L500S10000V35) with SMTP id com; Mon, 24 Jan 2000 11:16:57 -0800 From: "David Schwartz" To: "Mikhail Teterin" , "Warner Losh" Cc: Subject: RE: kern/13644 Date: Mon, 24 Jan 2000 11:16:57 -0800 Message-ID: <000001bf669f$94c4ec70$021d85d1@youwant.to> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 Importance: Normal In-Reply-To: <200001240547.AAA46261@rtfm.newton> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > =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