Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update way to have processes to run from Simgrid 3.7
[simgrid.git] / src / jmsg.c
index dbe6099..d7a2ae8 100644 (file)
@@ -751,7 +751,7 @@ Java_org_simgrid_msg_MsgNative_taskExecute(JNIEnv * env, jclass cls,
   MSG_error_t rv = MSG_task_execute(task);
 
   jxbt_check_res("MSG_task_execute()", rv,
-                 MSG_HOST_FAILURE | MSG_TASK_CANCELLED,
+                 MSG_HOST_FAILURE | MSG_TASK_CANCELED,
                  bprintf("while executing task %s",
                          MSG_task_get_name(task)));
 }
@@ -837,13 +837,17 @@ JNIEXPORT void JNICALL
   }
 
   XBT_INFO("Clean native world");
-  /* cleanup native stuff */
-  rv = MSG_OK != MSG_clean();
+}
+JNIEXPORT void JNICALL
+    JNICALL Java_org_simgrid_msg_Msg_clean(JNIEnv * env, jclass cls)
+{
+  /* cleanup native stuff. Calling it is ... useless since leaking memory at the end of the simulation is a non-issue */
+  MSG_error_t rv = MSG_OK != MSG_clean();
   jxbt_check_res("MSG_clean()", rv, MSG_OK,
                  bprintf
                  ("unexpected error : MSG_clean() failed .. please report this bug "));
 }
-
+   
 JNIEXPORT jint JNICALL
 Java_org_simgrid_msg_MsgNative_processKillAll(JNIEnv * env, jclass cls,
                                           jint jresetPID)