|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nachos.threads.Condition2
public class Condition2
An implementation of condition variables that disables interrupt()s for synchronization.
You must implement this.
Condition
Constructor Summary | |
---|---|
Condition2(Lock conditionLock)
Allocate a new condition variable. |
Method Summary | |
---|---|
void |
sleep()
Atomically release the associated lock and go to sleep on this condition variable until another thread wakes it using wake(). |
void |
wake()
Wake up at most one thread sleeping on this condition variable. |
void |
wakeAll()
Wake up all threads sleeping on this condition variable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Condition2(Lock conditionLock)
conditionLock
- the lock associated with this condition
variable. The current thread must hold this
lock whenever it uses sleep(),
wake(), or wakeAll().Method Detail |
---|
public void sleep()
public void wake()
public void wakeAll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |