Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add VM.reboot
authorSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 5 Jul 2012 12:11:08 +0000 (14:11 +0200)
committerSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 5 Jul 2012 12:11:08 +0000 (14:11 +0200)
org/simgrid/msg/VM.java
src/jmsg_vm.c
src/jmsg_vm.h

index 04676af..3de79f9 100644 (file)
@@ -84,5 +84,9 @@ public class VM {
         * No extra delay occurs. If you want to simulate this too, you want to use a MSG_process_sleep() or something
         */
        public native void shutdown();
+       /**
+        * @brief Reboot the VM, restarting all the processes in it.
+        */
+       public native void reboot();
                
 }
\ No newline at end of file
index 0923f63..ffa9714 100644 (file)
@@ -109,3 +109,14 @@ Java_org_simgrid_msg_VM_shutdown(JNIEnv *env, jobject jvm) {
     xbt_ex_free(e);
   }
 }
+JNIEXPORT void JNICALL
+Java_org_simgrid_msg_VM_reboot(JNIEnv *env, jobject jvm) {
+  msg_vm_t vm = jvm_get_native(env,jvm);
+  xbt_ex_t e;
+  TRY {
+    MSG_vm_reboot(vm);
+  }
+  CATCH(e) {
+    xbt_ex_free(e);
+  }
+}
index 6266bf6..79106fd 100644 (file)
@@ -94,4 +94,12 @@ Java_org_simgrid_msg_VM_resume(JNIEnv *env, jobject jvm);
  */
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_VM_shutdown(JNIEnv *env, jobject jvm);
+/**
+ * Class            org_simgrid_msg_VM
+ * Method           reboot
+ * Signature    ()V
+ */
+JNIEXPORT void JNICALL
+Java_org_simgrid_msg_VM_reboot(JNIEnv *env, jobject jvm);
+
 #endif