panic() cleanup.
[minix.git] / servers / vm / util.h
blob00b3baf8cd30611ebfc7ed31db0fce3c5a1bd538
2 #ifndef _UTIL_H
3 #define _UTIL_H 1
5 #include "vm.h"
6 #include "glo.h"
8 #define ELEMENTS(a) (sizeof(a)/sizeof((a)[0]))
10 #if SANITYCHECKS
11 #define vm_assert(cond) { \
12 if(vm_sanitychecklevel > 0 && !(cond)) { \
13 printf("VM:%s:%d: assert failed: %s\n", \
14 __FILE__, __LINE__, #cond); \
15 panic("assert failed"); \
16 } \
18 #else
19 #define vm_assert(cond) ;
20 #endif
22 #endif