lkml.org 
[lkml]   [2011]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 02/18] x86/ticketlock: convert spin loop to C
Date
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


\
 
 \ /
  Last update: 2011-08-24 22:05    [W:0.591 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site