From 1b398f9945d32b9d63d7fc64c9cf7a6af332d290 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Mon, 27 Nov 2006 01:53:14 -0800 Subject: [PATCH] add stop() darcs-hash:20061127095314-0c629-438fa14add7a3699090678d68db8e8c594dab0e1.gz --- src/org/ibex/nestedvm/Runtime.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/ibex/nestedvm/Runtime.java b/src/org/ibex/nestedvm/Runtime.java index 55851c3..44505c1 100644 --- a/src/org/ibex/nestedvm/Runtime.java +++ b/src/org/ibex/nestedvm/Runtime.java @@ -596,7 +596,12 @@ public abstract class Runtime implements UsermodeConstants,Registers,Cloneable { _started(); } - + + public final void stop() { + if (state != RUNNING && state != PAUSED) throw new IllegalStateException("stop() called in inappropriate state"); + exit(0, false); + } + /** Hook for subclasses to do their own startup */ void _started() { } -- 1.7.10.4