xref: /reactos/sdk/lib/drivers/virtio/kdebugprint.h (revision d6eebaa4)
1 #pragma once
2 
3 extern int virtioDebugLevel;
4 extern int bDebugPrint;
5 typedef void (*tDebugPrintFunc)(const char *format, ...);
6 extern tDebugPrintFunc VirtioDebugPrintProc;
7 
8 #define DPrintf(Level, MSG, ...) if ((!bDebugPrint) || Level > virtioDebugLevel) {} else VirtioDebugPrintProc(MSG, __VA_ARGS__)
9 
10 #define DEBUG_ENTRY(level)  DPrintf(level, "[%s]=>\n", __FUNCTION__)
11 #define DEBUG_EXIT_STATUS(level, status) DPrintf((status == NDIS_STATUS_SUCCESS ? level : 0), "[%s]<=0x%X\n", __FUNCTION__, (status))
12