ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/UncheckedLockLoops.java
(Generate patch)

Comparing jsr166/src/test/loops/UncheckedLockLoops.java (file contents):
Revision 1.1 by dl, Mon May 2 19:19:38 2005 UTC vs.
Revision 1.3 by jsr166, Sat Aug 1 22:12:59 2009 UTC

# Line 1 | Line 1
1   /*
2 + * Written by Doug Lea with assistance from members of JCP JSR-166
3 + * Expert Group and released to the public domain, as explained at
4 + * http://creativecommons.org/licenses/publicdomain
5 + */
6 + /*
7   * @test
8   * @summary basic safety and liveness of ReentrantLocks, and other locks based on them
9   */
# Line 178 | Line 183 | public final class UncheckedLockLoops {
183          private volatile int readBarrier;
184          final int loop(int n) {
185              int sum = 0;
186 <            int x = 0;;
186 >            int x = 0;
187              while (n-- > 0) {
188                  int r1 = readBarrier;
189                  x = setValue(LoopHelpers.compute1(getValue()));
# Line 194 | Line 199 | public final class UncheckedLockLoops {
199      private static class BuiltinLockLoop extends LockLoop {
200          final int loop(int n) {
201              int sum = 0;
202 <            int x = 0;;
202 >            int x = 0;
203              while (n-- > 0) {
204                  synchronized(this) {
205                      x = setValue(LoopHelpers.compute1(getValue()));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines