X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/38b2573451a7eda5b5852652659b3fdbcc5dc3ce..4c2c6b6eee29fde60e2654e4c4fb09cb0bcb627f:/org/simgrid/msg/Msg.java diff --git a/org/simgrid/msg/Msg.java b/org/simgrid/msg/Msg.java index 64c0713ad3..557d2b4805 100644 --- a/org/simgrid/msg/Msg.java +++ b/org/simgrid/msg/Msg.java @@ -15,7 +15,7 @@ public final class Msg { /* Statically load the library which contains all native functions used in here */ static { try { - System.loadLibrary("SG_java"); + System.loadLibrary("libSG_java"); } catch(UnsatisfiedLinkError e) { System.err.println("Cannot load the bindings to the simgrid library: "); e.printStackTrace(); @@ -25,12 +25,6 @@ public final class Msg { } } - /* FIXME: kill these C crufts */ - /** Returns the last error code of the simulation - * @return - */ - public final static native int getErrCode(); - /** Everything is right. Keep on going the way ! */ public static final int SUCCESS = 0; @@ -76,14 +70,29 @@ public final class Msg { public final static native void init(String[]args); /** - * Run the MSG simulation, and cleanup everything afterward. + * Run the MSG simulation. * - * If you want to chain simulations in the same process, you - * should call again createEnvironment and deployApplication afterward. + * The simulation is not cleaned afterward (see + * {@link #clean()} if you really insist on cleaning the C side), so you can freely + * retrieve the informations that you want from the simulation. In particular, retrieving the status + * of a process or the current date is perfectly ok. * - * @see MSG_run, MSG_clean + * @see MSG_run */ public final static native void run() ; + + /** + * Cleanup the MSG simulation. + * + * This function is only useful if you want to chain the simulations within + * the same environment. But actually, it's not sure at all that cleaning the + * JVM is faster than restarting a new one, so it's probable that using this + * function is not a brilliant idea. Do so at own risk. + * + * @see MSG_clean + */ + public final static native void clean(); + /** * The native implemented method to create the environment of the simulation.