Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge java simix process creation with the standard process creation
[simgrid.git] / src / java / jmsg.c
index 522b77f..7faed5e 100644 (file)
@@ -125,12 +125,12 @@ Java_simgrid_msg_MsgNative_processCreate(JNIEnv * env, jclass cls,
      process, process->simdata, process->simdata->m_host,
      process->simdata->m_host->simdata, env);
 
-  SIMIX_jprocess_create(process->name,
-                        process->simdata->m_host->simdata->smx_host,
-                        /*data */ (void *) process,
-                        jprocess, env, &process->simdata->s_process);
-
-
+  process->simdata->s_process = 
+    SIMIX_process_create(process->name, (xbt_main_func_t)jprocess, 
+                         /*data */ (void *) process,
+                         process->simdata->m_host->simdata->smx_host->name, 
+                         0, NULL, NULL);
+    
   DEBUG1("context created (s_process=%p)", process->simdata->s_process);
 
 
@@ -970,10 +970,9 @@ JNIEXPORT void JNICALL
 
   /* Run everything */
   if (MSG_OK != MSG_main()) {
-    CRITICAL0("We are here!");
     jxbt_throw_native(env, xbt_strdup("MSG_main() failed"));
   }
-  INFO0
+  DEBUG0
     ("MSG_main finished. Bail out before cleanup since there is a bug in this part.");
 
   DEBUG0("Clean java world");
@@ -985,13 +984,11 @@ JNIEXPORT void JNICALL
       jhost_unref(env, jhost);
   }
 
-  INFO0("Clean native world");
+  DEBUG0("Clean native world");
   /* cleanup native stuff */
   if (MSG_OK != MSG_clean()){
-    CRITICAL0("We are there!");
     jxbt_throw_native(env, xbt_strdup("MSG_main() failed"));
   }
-  INFO0("All good");
 }
 
 JNIEXPORT jint JNICALL