From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3p1M-00068Q-Bl for qemu-devel@nongnu.org; Tue, 12 May 2009 06:15:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3p1H-00064S-3a for qemu-devel@nongnu.org; Tue, 12 May 2009 06:15:35 -0400 Received: from [199.232.76.173] (port=39510 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3p1G-00064N-Pl for qemu-devel@nongnu.org; Tue, 12 May 2009 06:15:30 -0400 Received: from mx20.gnu.org ([199.232.41.8]:57693) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M3p1G-0006Nr-Dr for qemu-devel@nongnu.org; Tue, 12 May 2009 06:15:30 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M3p1F-0005VY-5i for qemu-devel@nongnu.org; Tue, 12 May 2009 06:15:29 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 1/4] Add module infrastructure to QEMU Date: Tue, 12 May 2009 11:15:25 +0100 References: <1242052009-27339-1-git-send-email-aliguori@us.ibm.com> <4A08A087.9050708@us.ibm.com> <4A094392.3020000@redhat.com> In-Reply-To: <4A094392.3020000@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905121115.26317.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Jean-Christophe PLAGNIOL-VILLARD , Gerd Hoffmann > >> why not use the constructor priority? > > > > We're just using constructors to register our real constructors so > > priority wouldn't really help us in the gcc constructors. > > Hmm? Just call the real constructors in the order they are registered > by the (prioritized) gcc constructors should do the trick, no? You're missing the point. The "priority" field is mis-named. It's actually defining different categories of init function that are invoked when the corresponding bit of qemu want them (e.g. registration of block backends v.s. registration of character backends). Paul