From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGgSO-0004x1-4v for qemu-devel@nongnu.org; Tue, 16 Jun 2009 17:44:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGgSJ-0004v6-7G for qemu-devel@nongnu.org; Tue, 16 Jun 2009 17:44:39 -0400 Received: from [199.232.76.173] (port=36347 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGgSJ-0004v3-1S for qemu-devel@nongnu.org; Tue, 16 Jun 2009 17:44:35 -0400 Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]:23291) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGgSI-0007Gq-E9 for qemu-devel@nongnu.org; Tue, 16 Jun 2009 17:44:34 -0400 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090616214433.GMYO5579.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Tue, 16 Jun 2009 22:44:33 +0100 Received: from miranda.arrow ([213.107.24.213]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090616214432.SQKQ13254.aamtaout01-winn.ispmail.ntl.com@miranda.arrow> for ; Tue, 16 Jun 2009 22:44:32 +0100 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1MGgSE-0004bN-Dm for qemu-devel@nongnu.org; Tue, 16 Jun 2009 22:44:30 +0100 Date: Tue, 16 Jun 2009 22:44:29 +0100 From: Stuart Brady Subject: Re: [Qemu-devel] [PATCH 16/21] linux-user: implement pipe2 [v3] Message-ID: <20090616214429.GA17638@miranda.arrow> References: <6ed5b469e54f235bef136cbd65e5769e205a2464.1244813287.git.riku.voipio@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ed5b469e54f235bef136cbd65e5769e205a2464.1244813287.git.riku.voipio@iki.fi> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Fri, Jun 12, 2009 at 04:50:26PM +0300, riku.voipio@iki.fi wrote: > +static abi_long do_pipe2(int host_pipe[], int flags) > +{ > +#ifdef CONFIG_PIPE2 > + return pipe2(host_pipe, flags); > +#else > + return -ENOSYS; > +#endif > +} > + > +static abi_long do_pipe(void *cpu_env, int pipedes, int flags) > +{ > + int host_pipe[2]; > + abi_long ret; > + ret = flags ? do_pipe2(host_pipe, flags) : pipe(host_pipe); This worries me slightly -- surely syscalls should be consistently supported / not supported (where feasible), regardless of the precise arguments that are supplied? (Otherwise, any run-time check for pipe2 would get tricked if that check specifies 0 for flags.) OTOH, I'm not sure what behaviour the library would provide for the pipe2() function, if the pipe2 syscall is not available. One could that the pipe2() function is another matter entirely, and that QEMU shouldn't be too concerned with its implementation, though. Cheers, -- Stuart Brady