--- jsr166/src/jsr166e/StampedLock.java 2012/10/16 23:50:08 1.21 +++ jsr166/src/jsr166e/StampedLock.java 2012/12/15 22:26:29 1.25 @@ -156,7 +156,7 @@ import java.util.concurrent.TimeUnit; * } * } * } finally { - * sl.unlock(stamp); + * sl.unlock(stamp); * } * } * }} @@ -226,7 +226,7 @@ public class StampedLock implements java * threads. Both await methods use a similar spin strategy: If * the associated queue appears to be empty, then the thread * spin-waits up to SPINS times (where each iteration decreases - * spin count with 50% probablility) before enqueing, and then, if + * spin count with 50% probability) before enqueuing, and then, if * it is the first thread to be enqueued, spins again up to SPINS * times before blocking. If, upon wakening it fails to obtain * lock, and is still (or becomes) the first waiting thread (which @@ -995,7 +995,7 @@ public class StampedLock implements java else if ((time = deadline - System.nanoTime()) <= 0L) return cancelWriter(node, false); if (node.prev == p && p.status == WAITING && - (p != whead || (state & WBIT) != 0L)) // recheck + (p != whead || (state & ABITS) != 0L)) // recheck U.park(false, time); if (interruptible && Thread.interrupted()) return cancelWriter(node, true);