[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] xen: Improvements to domain_crash_sync()
>>> On 24.01.18 at 17:31, <andrew.cooper3@xxxxxxxxxx> wrote: > On 24/01/18 16:15, Andrew Cooper wrote: >> On 24/01/18 16:11, Jan Beulich wrote: >>>>>> On 24.01.18 at 16:49, <andrew.cooper3@xxxxxxxxxx> wrote: >>>> --- a/xen/include/xen/sched.h >>>> +++ b/xen/include/xen/sched.h >>>> @@ -627,11 +627,12 @@ void __domain_crash(struct domain *d); >>>> * Mark current domain as crashed and synchronously deschedule from the >>>> local >>>> * processor. This function never returns. >>>> */ >>>> -void noreturn __domain_crash_synchronous(void); >>>> -#define domain_crash_synchronous() do { >>>> \ >>>> - printk("domain_crash_sync called from %s:%d\n", __FILE__, __LINE__); >>>> \ >>>> - __domain_crash_synchronous(); >>>> \ >>>> -} while (0) >>>> +void noreturn __domain_crash_sync(void); >>>> +#define domain_crash_sync(fmt, ...) do { \ >>>> + printk(XENLOG_G_ERR "domain_crash_sync(%pv) from %s: " fmt, \ >>>> + current, __func__, ## __VA_ARGS__); \ >>> This isn't C standard mandated usage of __VA_ARGS__; I generally >>> think it is better to use the older GCC extension when the number >>> of actuals may validly be zero (which the C standard doesn't allow). >> Do you mean go with the (fmt, args...) version ? > > I don't see any other GNU extensions which work here. Unless you can > point out exactly which one you mean, I'll stay with the ## __VA_ARGS__ > version, because that is consistent with other examples in our codebase. Isn't gprintk() a good enough example we have in our code base? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |