mirror of
https://github.com/arehnman/yttrium-virtio-gpu.git
synced 2026-11-07 02:06:32 +00:00
This should be the appropriate for handling variadic arguments in a MACRO. Signed-off-by: Sameeh Jubran <[email protected]>
12 lines
503 B
C
12 lines
503 B
C
#pragma once
|
|
|
|
extern int virtioDebugLevel;
|
|
extern int bDebugPrint;
|
|
typedef void (*tDebugPrintFunc)(const char *format, ...);
|
|
extern tDebugPrintFunc VirtioDebugPrintProc;
|
|
|
|
#define DPrintf(Level, MSG, ...) if ((!bDebugPrint) || Level > virtioDebugLevel) {} else VirtioDebugPrintProc(MSG, __VA_ARGS__)
|
|
|
|
#define DEBUG_ENTRY(level) DPrintf(level, "[%s]=>\n", __FUNCTION__)
|
|
#define DEBUG_EXIT_STATUS(level, status) DPrintf((status == NDIS_STATUS_SUCCESS ? level : 0), "[%s]<=0x%X\n", __FUNCTION__, (status))
|