| From | Andi Kleen <> | Subject | Re: [PATCH 02/18] x86/ticketlock: convert spin loop to C | Date | Wed, 24 Aug 2011 13:02:29 -0700 |
| |
Jeremy Fitzhardinge <jeremy@goop.org> writes: > + > + for (;;) { > + if (inc.tickets.head == inc.tickets.tail) > + goto out;
What's wrong with break ? Similar below.
> + cpu_relax(); > + inc.tickets.head = ACCESS_ONCE(lock->tickets.head); > + } > +out: barrier(); /* make sure nothing creeps before the lock is taken */ > }
-Andi -- ak@linux.intel.com -- Speaking for myself only
|