Fixed extern declaration from pointer to array
[minix.git] / servers / vm / util.h
blob2b5bd6374e4aac4c4905597e1fe72ead5f3d07a4
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("VM", "assert failed", NO_NUM); \
16 } \
18 #else
19 #define vm_assert(cond) ;
20 #endif
22 #define vm_panic(str, n) { char _pline[100]; \
23 sprintf(_pline, "%s:%d: %s", __FILE__, __LINE__, (str)); \
24 panic("VM", _pline, (n)); \
27 #endif