[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 0/7][RFC] make xenguest save & restore functions reentrant
Keir Fraser wrote: Rather than making the macros take extra arguments, can you make them refer to ctx->foo instead (i.e., make it implciit the structure containing these ex-globals is called ctx)? It avoids having to change every caller, and some callers already have macros nested three deep and adding guest_width/max_mfn all over the place does not help readability. I agree this isn't pretty. unfortunately i tried the route of changing the macro to get from ctx-> but the macro is used also on other files xc_core_x86.c and xc_resume.c which use the macro with the guest_width and/or p2m_size on the call stack. The only other solution I though of, would be to duplicate the value of the ex-globals on the stack like: ... int guest_width = ctx->guest_width; int p2m_size = ctx->p2m_size; ...I decided against, because it might look odd since it doesn't appear used and also means I need to track all assignment to this variable. If you prefer, I can change this patchset to do that.There's also the solution of carrying this patchset, and prettyfying some of thoses macro calls as if there were "expensive calls" just like my patch 5/7 does. Also send also as attachments next time. I have problems applying these patches from inline email for some reason; some chunks don't apply. yep ok. -- Vincent _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |