From 651068fba96141ffc78b9da231fb6b7914f3e82b Mon Sep 17 00:00:00 2001 From: cristianrosa Date: Mon, 17 Aug 2009 14:41:18 +0000 Subject: [PATCH] Finally the Java interface is working again! (It was broken because of me, sorry :S) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6579 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/java/jmsg.c | 7 ++----- src/msg/global.c | 2 -- src/simix/smx_process.c | 5 ++++- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/java/jmsg.c b/src/java/jmsg.c index 522b77f929..cb01fa0bd2 100644 --- a/src/java/jmsg.c +++ b/src/java/jmsg.c @@ -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 diff --git a/src/msg/global.c b/src/msg/global.c index 431996b89d..3870712c14 100644 --- a/src/msg/global.c +++ b/src/msg/global.c @@ -229,8 +229,6 @@ MSG_error_t MSG_clean(void) SIMIX_clean(); - - return MSG_OK; } diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index db50d01160..f6e37a70ab 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -162,7 +162,10 @@ void SIMIX_jprocess_create(const char *name, smx_host_t host, process->smx_host = host; process->mutex = NULL; process->cond = NULL; - process->context = SIMIX_context_new(jprocess, 0, NULL, NULL, NULL); + process->context = SIMIX_context_new(jprocess, 0, NULL, + simix_global->cleanup_process_function, + process); + process->data = data; /* Add the process to it's host process list */ -- 2.20.1