lkml.org 
[lkml]   [1999]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: spin_unlock optimization(i386)

On Fri, 26 Nov 1999, Helge Hafting wrote:

> Don't be confused when this too eventually breaks when tested.
> The counters will wrap, i slightly before j, and that may trigger the
> BUG().

yep, right.

> For a safe test, change the first loop to:
>
> if (i == 0x7FFFFFFF) {
> j = 0;
> i = 0;
> }

yep, subtle, and the order of those two stores is not irrelevant either.

Ingo


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2011 Jasper Spaans