github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/vmm/jlmdebug.h (about) 1 #ifndef JLMDEBUG__H_ 2 #define JLMDEBUG__H_ 3 4 #include "bootstrap_types.h" 5 #include "bootstrap_string.h" 6 #include "bootstrap_print.h" 7 8 #define UNUSEDVAR(x) ((void)x) 9 #undef VMM_ASSERT 10 #define VMM_ASSERT(x) \ 11 if(!(x)) { bprint("VMM_ASSERT\n"); LOOP_FOREVER } 12 13 #define LONGLOOP 8000000000ULL 14 #define MEDIUMLOOP 800000000ULL 15 #define SHORTLOOP 100000000ULL 16 17 inline static int evmmdebugwait(UINT64 limit) 18 { 19 volatile UINT64 l; 20 for(l=0; l<limit;l++); 21 return l; 22 } 23 24 #if 1 25 #ifdef JLMDEBUG 26 #undef VMM_DEADLOOP 27 #define VMM_DEADLOOP() {bprint("Hit Deadloop\n");LOOP_FOREVER} 28 #endif 29 #endif 30 #endif