From: Gerd Hoffmann Subject: Re: [Qemu-devel] [PATCH 02/10] xen: backend driver core Date: Wed, 08 Apr 2009 16:25:37 +0200 Message-ID: <49DCB3E1.4030108@redhat.com> 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> <49DCA3CF.1080905@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <49DCA3CF.1080905@us.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anthony Liguori Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org List-Id: xen-devel@lists.xenproject.org On 04/08/09 15:17, Anthony Liguori wrote: > 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. The variables are more global xen state, not device / xenbus state. The usage is not limited to the backend drivers, the domain builder code will use them as well. There will never ever be more than one instance of these. I don't see the point of placing them into a struct and passing around a pointer. cheers, Gerd