mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-02 20:35:32 +00:00
It is an extension of GCC CPP to: * allow omitting a variable macro argument entirely, and * use ## __VA_ARGS__ to remove the the comma before ## __VA_ARGS__ when __VA_ARGS__ is empty. The only use of ## _VA_ARGS__ is to define the pr_xxx() macros, with the first argument being the format string and the rest the to-be-formatted arguments. The format string is explicitly spelled out because another macro pr_fmt() is used to add to the format string a prefix which is customizable by defining what pr_fmt() expands to. For C99 compliance, this patch changes the pr_xxx() macros in the following pattern. - #define pr_fatal(fmt, ...) \ - do_logmsg(LOG_FATAL, pr_fmt(fmt), ## __VA_ARGS__); \ + #define pr_fatal(...) \ + do_logmsg(LOG_FATAL, pr_prefix __VA_ARGS__); \ Reference: * https://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html#Variadic-Macros Signed-off-by: Junjie Mao <junjie.mao@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> |
||
---|---|---|
.. | ||
debug | ||
guest | ||
assign.c | ||
cpu_primary.S | ||
cpu_secondary.S | ||
cpu_state_tbl.c | ||
cpu.c | ||
cpuid.c | ||
ept.c | ||
gdt.c | ||
idt.S | ||
interrupt.c | ||
intr_lapic.c | ||
intr_main.c | ||
io.c | ||
ioapic.c | ||
irq.c | ||
mmu.c | ||
notify.c | ||
retpoline-thunk.S | ||
softirq.c | ||
timer.c | ||
trusty.c | ||
vmexit.c | ||
vmx_asm.S | ||
vmx.c | ||
vtd.c |