From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LpknZ-0003iX-Ow for qemu-devel@nongnu.org; Fri, 03 Apr 2009 10:55:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LpknV-0003gs-18 for qemu-devel@nongnu.org; Fri, 03 Apr 2009 10:55:13 -0400 Received: from [199.232.76.173] (port=33936 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LpknU-0003go-Qw for qemu-devel@nongnu.org; Fri, 03 Apr 2009 10:55:08 -0400 Received: from mx2.redhat.com ([66.187.237.31]:54555) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LpknU-0001pY-7v for qemu-devel@nongnu.org; Fri, 03 Apr 2009 10:55:08 -0400 Message-ID: <49D622F2.705@redhat.com> Date: Fri, 03 Apr 2009 17:53:38 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] Introduce module API to QEMU References: <1238724755-15929-1-git-send-email-aliguori@us.ibm.com> <200904031235.33157.paul@codesourcery.com> <49D607A3.7040907@codemonkey.ws> <200904031409.32792.paul@codesourcery.com> <49D61924.3080803@codemonkey.ws> In-Reply-To: <49D61924.3080803@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paul Brook Anthony Liguori wrote: >> >> Hmm, this raises annother issue - we've got to be extremely careful >> about ordering. It's not inconcievable that the PCI support code >> would have constructors (e.g. to register a PCI bus type). >> > > Looks like constructor/destructor has explicit support for ordering. > Neat. I'd avoid it. Have the constructor do a *pci_module_table++ = blah and iterate through that later. I prefer to have the code explicit somewhere rather than gobs of unportable magic. Use it where you have to, but not elsewhere. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.