|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: [PATCH RFC 02/12] x86/ticketlock: convert spin loop to C
On 08/06/2010 01:33 PM, Jeremy Fitzhardinge wrote: On 08/06/2010 01:17 PM, H. Peter Anvin wrote:On 08/06/2010 07:53 AM, Jeremy Fitzhardinge wrote:On 08/06/2010 05:43 AM, Jan Beulich wrote:You certainly mean "the compiler currently treats this as being:" - I don't think there's a guarantee it'll always be doing so. In this particular case, though, I would somewhat expect the more conventional:
while (inc.tickets.head != inc.tickets.tail) {
cpu_relax();
inc.tickets.head = ACCESS_ONCE(lock->tickets_head);
}
-hpa
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |