From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60790 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQG9s-0004Cl-7a for qemu-devel@nongnu.org; Wed, 08 Dec 2010 04:17:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQG9r-0006Q2-4l for qemu-devel@nongnu.org; Wed, 08 Dec 2010 04:17:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQG9q-0006Ph-Tm for qemu-devel@nongnu.org; Wed, 08 Dec 2010 04:17:55 -0500 Message-ID: <4CFF4D3E.5080202@redhat.com> Date: Wed, 08 Dec 2010 10:17:50 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [RFC][PATCH v5 01/21] Move code related to fd handlers into utility functions References: <1291399402-20366-1-git-send-email-mdroth@linux.vnet.ibm.com> <1291399402-20366-2-git-send-email-mdroth@linux.vnet.ibm.com> <4CFE3738.4010506@redhat.com> <4CFE4928.5000409@linux.vnet.ibm.com> <4CFE4C6B.1010600@redhat.com> <20101208091513.GA5974@stefanha-thinkpad.localdomain> In-Reply-To: <20101208091513.GA5974@stefanha-thinkpad.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: agl@linux.vnet.ibm.com, abeekhof@redhat.com, Michael Roth , qemu-devel@nongnu.org, aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com On 12/08/10 10:15, Stefan Hajnoczi wrote: > On Tue, Dec 07, 2010 at 04:02:03PM +0100, Jes Sorensen wrote: >> Anything to avoid qemu_set_fd_handler17() at some point. I think using >> __qemu_set_fd_handler() encourages people to modify that code rather >> than copy it. > > I agree that qemu_set_fd_handler3() could be named something more > meaningful. Unfortunately we can't use __qemu_set_fd_handler() because > the C language standard reserves identifiers that start with double > underscore for the standard library. The Linux kernel gets away with it > because the code is freestanding but that doesn't apply to QEMU. Hmmm you sure that is actually a rule, rather than a convention? Either way, we can use 3 underscores, or leave the function static, in which case the C library names are a non issue. Cheers, Jes