From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lpm3w-0007Ft-0y for qemu-devel@nongnu.org; Fri, 03 Apr 2009 12:16:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lpm3r-0007EQ-6A for qemu-devel@nongnu.org; Fri, 03 Apr 2009 12:16:11 -0400 Received: from [199.232.76.173] (port=60186 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lpm3q-0007EA-VR for qemu-devel@nongnu.org; Fri, 03 Apr 2009 12:16:07 -0400 Received: from yx-out-1718.google.com ([74.125.44.154]:3343) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lpm3q-0005iS-NZ for qemu-devel@nongnu.org; Fri, 03 Apr 2009 12:16:06 -0400 Received: by yx-out-1718.google.com with SMTP id 34so689572yxf.82 for ; Fri, 03 Apr 2009 09:16:06 -0700 (PDT) Message-ID: <49D63638.9090509@codemonkey.ws> Date: Fri, 03 Apr 2009 11:15:52 -0500 From: Anthony Liguori 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> <49D622F2.705@redhat.com> In-Reply-To: <49D622F2.705@redhat.com> 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 Avi Kivity wrote: > 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. Yup, came to that conclusion too. Regards, Anthony Liguori > I prefer to have the code explicit somewhere rather than gobs of > unportable magic. Use it where you have to, but not elsewhere. > >