1 //+----------------------------------------------------------------------------
11 // Created: sgasch 10 Oct 2003
13 //+----------------------------------------------------------------------------
21 #define ARRAY_LENGTH(a) (sizeof((a)) / sizeof((a)[0]))
22 #define MIN(x, y) (((x) < (y)) ? (x) : (y))
23 #define MAX(x, y) (((x) > (y)) ? (x) : (y))
26 void _assert(CHAR *, CHAR *, ULONG);
27 void VideoPrint(CHAR *, ...);
28 #define ASSERT(x) if (x) \
31 { _assert(__FUNCTION__ , \
34 #define TRACE(f, ...) VideoPrint("%s:%u> " ##f , __FUNCTION__ , \
35 __LINE__ , ##__VA_ARGS__)
38 #define TRACE(f, ...) ;
41 #define CURRENT_STAMP(a) asm volatile("rdtsc" : "=a"(((unsigned int *)(a))[0]), "=d"(((unsigned int *)a)[1]))
43 #endif /* _MACROS_H_ */