 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 1/1] plat/xen: Add flush for xen console
 Hi,You want to add a commit message here explaining why the flush. You cover letter seems a good candidate for that. On 10/25/18 5:05 PM, Birlea Costin wrote: 
 The compiler is free to assume that the value of out_const and out_prod will never change. So the following optimization is valid: a = intf->out_cons; b = intf->out_prod; while (a < b);And will result to potentially an infinite loop. You can request the compiler to always read out_cons and out_prod by adding a barrier in the loop. I.e: 
while (intf->out_cons < int->out_prod)
{
    barrier();
}
Cheers,
--
Julien Grall
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |