From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrXeV-00049E-Gr for qemu-devel@nongnu.org; Wed, 08 Apr 2009 09:17:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrXeR-00046f-Q8 for qemu-devel@nongnu.org; Wed, 08 Apr 2009 09:17:15 -0400 Received: from [199.232.76.173] (port=37524 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrXeR-00046J-7W for qemu-devel@nongnu.org; Wed, 08 Apr 2009 09:17:11 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:32992) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LrXeQ-0003PP-OI for qemu-devel@nongnu.org; Wed, 08 Apr 2009 09:17:11 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e9.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n38D7F4P025517 for ; Wed, 8 Apr 2009 09:07:15 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n38DH69c179810 for ; Wed, 8 Apr 2009 09:17:06 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n38DH5uw023259 for ; Wed, 8 Apr 2009 09:17:06 -0400 Message-ID: <49DCA3CF.1080905@us.ibm.com> Date: Wed, 08 Apr 2009 08:17:03 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 02/10] xen: backend driver core References: <1239115497-1884-1-git-send-email-kraxel@redhat.com> <1239115497-1884-3-git-send-email-kraxel@redhat.com> <49DBAC54.7010500@us.ibm.com> <49DC6CB7.8000602@redhat.com> In-Reply-To: <49DC6CB7.8000602@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: Gerd Hoffmann Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org Gerd Hoffmann wrote: > On 04/07/09 21:41, Anthony Liguori wrote: >>> +/* private */ >>> +static TAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = >>> TAILQ_HEAD_INITIALIZER(xendevs); >>> +static int debug = 0; >> >> Would be better to have all of this in a structure that had a single >> static instance. Would be even better if you could avoid requiring the >> static instance. > > Huh? Point being? This is just a list head, i.e. a pointer (or two?). I meant the public stuff too. I don't like having extern variables all over the place. It would be better to have this in a structure that was passed to all of the backend drivers that they then passed as a context. This will become more useful down the road too when we start introducing a common device model and finer grain locking. Regards, Anthony Liguori