From owner-freebsd-arch@FreeBSD.ORG Thu May 17 10:44:19 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A621416A400 for ; Thu, 17 May 2007 10:44:19 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 63DE513C48A for ; Thu, 17 May 2007 10:44:19 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id B47F4208A; Thu, 17 May 2007 12:44:15 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 3BA5B2087; Thu, 17 May 2007 12:44:15 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 0A102507E; Thu, 17 May 2007 12:44:15 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Peter Jeremy References: <86odknqvf3.fsf@dwp.des.no> <86wszah2ua.fsf@dwp.des.no> <86fy5wkim5.fsf@dwp.des.no> <20070517094445.GD1149@turion.vk2pj.dyndns.org> Date: Thu, 17 May 2007 12:44:14 +0200 In-Reply-To: <20070517094445.GD1149@turion.vk2pj.dyndns.org> (Peter Jeremy's message of "Thu\, 17 May 2007 19\:44\:45 +1000") Message-ID: <86ps4zu3up.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: MQ , freebsd-arch@freebsd.org Subject: Re: A problem with the select(2) interface X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2007 10:44:19 -0000 Peter Jeremy writes: > There are two situations where the actual behaviour matters: > 1) Porting a random application that assumes specific behaviour for > select(). I need to know how FreeBSD behaves to know whether I > need to patch the code or not. Easy: patch the code to not assume anything about the contents of the struct timeval after select(2) returns. > 2) I'm writing code that is specifically for FreeBSD. If I know > timeout will not change, I can optimise the code to avoid having to > re-initialise timeout before each select call. OK, I'll bite. If you can show me that you were actually able to measure the difference in performance between code that reinitializes the timeout every time and code that doesn't, I'll commit your patch. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no