org.mmtk.vm
Class Monitor

java.lang.Object
  extended by org.mmtk.vm.Monitor
Direct Known Subclasses:
Monitor

public abstract class Monitor
extends Object

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


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

Constructor Detail

Monitor

public Monitor()
Method Detail

lock

public abstract void lock()
Block until the lock is acquired.


unlock

public abstract void unlock()
Release the lock.


await

public abstract void await()
Wait for a broadcast.


broadcast

public abstract void broadcast()
Send a broadcast.