From owner-freebsd-arch@FreeBSD.ORG Mon May 14 14:56:14 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 A2C0C16A410 for ; Mon, 14 May 2007 14:56:14 +0000 (UTC) (envelope-from antinvidia@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.237]) by mx1.freebsd.org (Postfix) with ESMTP id 51AF213C468 for ; Mon, 14 May 2007 14:56:14 +0000 (UTC) (envelope-from antinvidia@gmail.com) Received: by nz-out-0506.google.com with SMTP id s1so1909191nze for ; Mon, 14 May 2007 07:56:13 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=ityqgo57NqHgq3AGzsJz/5MJEjNMgm3yB9xbQPoj/nMnF24BK2JbuLUMqo2Kxt5WSey5sFrwrbX8VDJXQXtymP+yViH+lisyhgcUFXD/Z75cO/ZNhSfWwBHDmZCLkqZZOqctZ7u3QLaQyvjkm3vsEiMgsRJ3R27EuS/RXOQ+zJ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=jPXvLdimalw0/IAfBz6vXsht3q8avkzjCkn/ZlwQ02MyAHyjqwnH27ppP99YlwpIbQcok+8ZSorcH9X/LaGpUYxzdIeoAuwXMiHsIopqpRzbKzu/df2g02G7T4sPVF/jr4+cR33CK2YQnX3CmHKMMBy7vPUEK55GYs8cefII5Iw= Received: by 10.114.13.1 with SMTP id 1mr1007307wam.1179152955339; Mon, 14 May 2007 07:29:15 -0700 (PDT) Received: by 10.115.54.2 with HTTP; Mon, 14 May 2007 07:29:15 -0700 (PDT) Message-ID: Date: Mon, 14 May 2007 22:29:15 +0800 From: MQ To: freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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: Mon, 14 May 2007 14:56:14 -0000 Hi, I'm writing a network application these days, for compatibility, I choose the select(2) interface to do event polling. When using it, I'm curious about the fact that the type of the final parameter is `struct timeval *'. I skimmed through the codes in /sys/kern/sys_generic.c, there is nothing written to this address. So, I think if we can use `const struct timeval *' instead? This type can inform the users explicitly that we do NOT modify the timeval struct. But I'm not sure if this modification will conflict with the POSIX standard. Will you please tell me your considerations? Any suggestions will be appreciated. Thanks. MQ