/*
 * (C) Copyright Department of Computer Science,
 * Australian National University. 2002
 */
package s3.core.services.memory.vmInterface;

import s3.core.services.memory.JMTk.VM_PragmaInterruptible;
import s3.core.services.memory.JMTk.VM_Uninterruptible;

/**
 * This class allows JMTk to register call backs with VM_Callbacks.
 * 
 * @author <a href="http://cs.anu.edu.au/~Steve.Blackburn">Steve Blackburn</a>
 *
 * @version $Revision: 1.2 $
 * @date $Date: 2003/12/04 16:44:11 $
 */
public class Monitor 
  implements Constants, VM_Uninterruptible
//TODO:VM_Callbacks.ExitMonitor
{
  public final static String Id = "$Id: Monitor.java,v 1.2 2003/12/04 16:44:11 flack Exp $"; 

  /**
   * Register the exit monitor at boot time.
   */
  public static void boot() throws VM_PragmaInterruptible {
//TODO: put back    VM_Callbacks.addExitMonitor(new Monitor());
  }

  /**
   * The VM is about to exit.  Notify the plan.
   *
   * @param value The exit value
   */
  public void notifyExit(int value) {
    VM_Interface.getPlan().notifyExit(value);
  }
}
