import java.util.concurrent.locks.*;

class JSR166 {
	Lock l = new ReentrantLock();
	int x;

	void l() {
		l.lock();
		}

	void foo() {
		l.lock();
		x++;
		if (x >= 0) 
			l.unlock();
		}

	void increment() {
		l.lock();
		x++;
		l.unlock();
		}

	void decrement() {
		l.lock();
		try {
		  x++;
		} finally {
		  l.unlock();
		  }
		}
	}



	
	

@@ -335,13 +335,163 @@
 %09%7D%0A%09
-%7D%0A%0A%0A
 %0A%09%0A%09
+void waitOnCondition(Condition cond) throws InterruptedException %7B%0A%09%09while (x == 0) %7B%0A%09%09cond.wait();%0A%09%09cond.wait(1000L);%0A%09%09cond.wait(1000L, 10);%0A%09%09%7D%0A%09%7D%0A%09%7D
 %0A

Call wait() on a Condition.