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

Comparing jsr166/src/test/loops/CheckedLockLoops.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 174 | Line 179 | public final class CheckedLockLoops {
179          private volatile int readBarrier;
180          final int loop(int n) {
181              int sum = 0;
182 <            int x = 0;;
182 >            int x = 0;
183              while (n-- > 0) {
184                  int r1 = readBarrier;
185                  x = setValue(LoopHelpers.compute1(getValue()));
# Line 190 | Line 195 | public final class CheckedLockLoops {
195      private static class BuiltinLockLoop extends LockLoop {
196          final int loop(int n) {
197              int sum = 0;
198 <            int x = 0;;
198 >            int x = 0;
199              while (n-- > 0) {
200                  synchronized(this) {
201                      x = setValue(LoopHelpers.compute1(getValue()));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines