org.jikesrvm.mm.mmtk
Class Monitor

java.lang.Object
  extended by org.mmtk.vm.Monitor
      extended by org.jikesrvm.mm.mmtk.Monitor

public final class Monitor
extends Monitor

Provides MMTk access to a heavy lock with condition variable. Functionally similar to Java monitors, but safe in the darker corners of runtime code.


Field Summary
private  Monitor theLock
           
 
Constructor Summary
Monitor(String name)
           
 
Method Summary
 void await()
          Wait for a broadcast.
 void broadcast()
          Send a broadcast.
 void lock()
          Block until the lock is acquired.
 void unlock()
          Release the lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theLock

private final Monitor theLock
Constructor Detail

Monitor

public Monitor(String name)
Method Detail

lock

public void lock()
Description copied from class: Monitor
Block until the lock is acquired.

Specified by:
lock in class Monitor

unlock

public void unlock()
Description copied from class: Monitor
Release the lock.

Specified by:
unlock in class Monitor

await

public void await()
Description copied from class: Monitor
Wait for a broadcast.

Specified by:
await in class Monitor

broadcast

public void broadcast()
Description copied from class: Monitor
Send a broadcast.

Specified by:
broadcast in class Monitor