X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm.c;h=27edd92ac677bf2c79b4cca6e1658a59eae0a081;hp=fcc6ea55be17391534bff62893118e1018c58b61;hb=e8c6db81c1ad76fab0f6a783c03654145e41599d;hpb=5567d84b2bb858aaed18b724a59be2af09674988 diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index fcc6ea5..27edd92 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -174,9 +174,17 @@ void v3_yield_cond(struct guest_info * info) { } } +/* + * unconditional cpu yield + * if the yielding thread is a guest context, the guest quantum is reset on resumption + * Non guest context threads should call this function with a NULL argument + */ void v3_yield(struct guest_info * info) { V3_Yield(); - rdtscll(info->yield_start_cycle); + + if (info) { + rdtscll(info->yield_start_cycle); + } }