[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C5C21E3.1020004@goop.org>
Date: Fri, 06 Aug 2010 07:53:23 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Jan Beulich <JBeulich@...ell.com>
CC: Peter Zijlstra <peterz@...radead.org>,
Xen-devel <xen-devel@...ts.xensource.com>,
Avi Kivity <avi@...hat.com>, Nick Piggin <npiggin@...e.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC 02/12] x86/ticketlock: convert spin loop to C
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.
>
>> for (;;) {
>> if (inc.tickets.head == inc.tickets.tail)
>> goto out;
>> ...
>> }
>> out: barrier();
>> }
>>
>> (Which would probably be a reasonable way to clarify the code.)
> I therefore think it needs to be written this way.
Agreed.
J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists