--- jsr166/src/test/loops/SimpleMutexLoops.java 2007/02/19 00:46:06 1.3 +++ jsr166/src/test/loops/SimpleMutexLoops.java 2009/10/29 23:09:08 1.4 @@ -16,7 +16,7 @@ public final class SimpleMutexLoops { public static void main(String[] args) throws Exception { int maxThreads = 100; - if (args.length > 0) + if (args.length > 0) maxThreads = Integer.parseInt(args[0]); new MutexLoop(1).test(); @@ -31,8 +31,8 @@ public final class SimpleMutexLoops { if (i == k) { k = i << 1; i = i + (i >>> 1); - } - else + } + else i = k; } pool.shutdown(); @@ -52,7 +52,7 @@ public final class SimpleMutexLoops { } final void test() throws Exception { - for (int i = 0; i < nthreads; ++i) + for (int i = 0; i < nthreads; ++i) pool.execute(this); barrier.await(); barrier.await(); @@ -72,7 +72,7 @@ public final class SimpleMutexLoops { public final void run() { final Mutex lock = this.lock; try { - barrier.await(); + barrier.await(); int sum = v + 1; int x = 0; int n = iters; @@ -91,12 +91,12 @@ public final class SimpleMutexLoops { ++readBarrier; for (int l = x & 7; l > 0; --l) sum += LoopHelpers.compute6(sum); - } + } barrier.await(); result += sum; } - catch (Exception ie) { - return; + catch (Exception ie) { + return; } } }