This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [Qemu-devel] [PATCH 02/10] xen: backend driver core

To: Gerd Hoffmann <kraxel@xxxxxxxxxx>
Subject: [Xen-devel] Re: [Qemu-devel] [PATCH 02/10] xen: backend driver core
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Wed, 08 Apr 2009 08:17:03 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, qemu-devel@xxxxxxxxxx
Delivery-date: Wed, 08 Apr 2009 06:17:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49DC6CB7.8000602@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1239115497-1884-1-git-send-email-kraxel@xxxxxxxxxx> <1239115497-1884-3-git-send-email-kraxel@xxxxxxxxxx> <49DBAC54.7010500@xxxxxxxxxx> <49DC6CB7.8000602@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20090320)
Gerd Hoffmann wrote:
On 04/07/09 21:41, Anthony Liguori wrote:
+/* private */
+static TAILQ_HEAD(XenDeviceHead, XenDevice) 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.


Anthony Liguori

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>