From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Hanquez Subject: Re: [PATCH 0/7][RFC] make xenguest save & restore functions reentrant Date: Mon, 16 Nov 2009 11:39:41 +0000 Message-ID: <4B0139FD.2060703@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Xen Devel List-Id: xen-devel@lists.xenproject.org Keir Fraser wrote: > Another option would be for all users of the macros to have a 'xenguest_ctx' > structure, or whatever you call it. So e.g., in xc_resume: > struct xenguest_ctx _ctx, *ctx = &_ctx; > ctx->guest_width = ... > /* Leave unnecessary/meaningless fields for this caller uninitialised. */ > > What do you think? The ctx struct can't be that big; we can just ignore > fields that make no sense outside save/restore (i.e., kind of split it into > general-purpose and private/application-specific fields); and it does keep > the macro invocations cleaner. I'll give that a try. I don't think it's going to make that serie much nicer though. -- Vincent