From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932139Ab0IXNp3 (ORCPT ); Fri, 24 Sep 2010 09:45:29 -0400 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:36635 "EHLO www.etchedpixels.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756425Ab0IXNp1 (ORCPT ); Fri, 24 Sep 2010 09:45:27 -0400 Date: Fri, 24 Sep 2010 15:07:38 +0100 From: Alan Cox To: Alan Cox Cc: Richard Cochran , linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-api@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, Arnd Bergmann , Christoph Lameter , David Miller , John Stultz , Krzysztof Halasa , Peter Zijlstra , Rodolfo Giometti , Thomas Gleixner Subject: Re: [PATCH v6 0/8] ptp: IEEE 1588 hardware clock support Message-ID: <20100924150738.744297d0@lxorguk.ukuu.org.uk> In-Reply-To: <20100924150246.0e6064b6@lxorguk.ukuu.org.uk> References: <20100923213654.0c64b047@lxorguk.ukuu.org.uk> <20100924131407.GA3113@riccoc20.at.omicron.at> <20100924150246.0e6064b6@lxorguk.ukuu.org.uk> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWysKsSBQMIAwIZCwj///8wIhxoRDXH9QHCAAABeUlEQVQ4jaXTvW7DIBAAYCQTzz2hdq+rdg494ZmBeE5KYHZjm/d/hJ6NfzBJpp5kRb5PHJwvMPMk2L9As5Y9AmYRBL+HAyJKeOU5aHRhsAAvORQ+UEgAvgddj/lwAXndw2laEDqA4x6KEBhjYRCg9tBFCOuJFxg2OKegbWjbsRTk8PPhKPD7HcRxB7cqhgBRp9Dcqs+B8v4CQvFdqeot3Kov6hBUn0AJitrzY+sgUuiA8i0r7+B3AfqKcN6t8M6HtqQ+AOoELCikgQSbgabKaJW3kn5lBs47JSGDhhLKDUh1UMipwwinMYPTBuIBjEclSaGZUk9hDlTb5sUTYN2SFFQuPe4Gox1X0FZOufjgBiV1Vls7b+GvK3SU4wfmcGo9rPPQzgIabfj4TYQo15k3bTHX9RIw/kniir5YbtJF4jkFG+dsDK1IgE413zAthU/vR2HVMmFUPIHTvF6jWCpFaGw/A3qWgnbxpSm9MSmY5b3pM1gvNc/gQfwBsGwF0VCtxZgAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > You can't do that avoiding as you might like because the behaviour of > file handle numbering is defined by the standards. Hence the "f*" > versions of the calls (and of lots of other stuff) > > Whether you add new syscalls or do the fd passing using flags and hide > the ugly bits in glibc is another question. To add an example of what I mean you might end up defining "CLOCK_FD" to indicate to use the fd in the struct, but given syscalls are trivial codewise and would end up as fclock_foo(int fd, blah) { clock = fd_to_clock(fd); if (error) return error clock_do_foo(clock, blah); clock_put(clock); } and clock_foo(int posixid, blah) { clock = posix_to_clock(posixid) ... rest same } as wrappers it seems hardly worth adding ugly hacks