X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm.h;h=ee7010764ef5d43063aa3fed7db4537e3e14e31e;hb=58ea47f1e53d66fae94afb18a314bdfd8862948e;hp=0d958218682efc2c7bdd38d49e70db379b85e397;hpb=07a12ade201ee7c2fe2358084ca079d2facac500;p=palacios.git diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index 0d95821..ee70107 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -193,10 +193,6 @@ struct guest_info; } while (0) - - - - #define V3_Call_On_CPU(cpu, fn, arg) \ do { \ extern struct v3_os_hooks * os_hooks; \ @@ -216,23 +212,23 @@ struct guest_info; thread; \ }) - #endif - - - - - /* ** */ + #define V3_ASSERT(x) \ do { \ + extern struct v3_os_hooks * os_hooks; \ if (!(x)) { \ PrintDebug("Failed assertion in %s: %s at %s, line %d, RA=%lx\n", \ __func__, #x, __FILE__, __LINE__, \ (ulong_t) __builtin_return_address(0)); \ - while(1); \ + while(1){ \ + if ((os_hooks) && (os_hooks)->yield_cpu) { \ + (os_hooks)->yield_cpu(); \ + } \ + } \ } \ } while(0) \ @@ -333,5 +329,4 @@ int v3_stop_vm(struct v3_vm_info * vm); int v3_deliver_irq(struct v3_vm_info * vm, struct v3_interrupt * intr); - #endif