X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ef33b9c0c2c0e9c15c27fce82515a23e8aadc0ed..9f21f35eadfc5d1f43d3e7a4b591711fd7fb9616:/src/bindings/java/jmsg_synchro.cpp?ds=sidebyside diff --git a/src/bindings/java/jmsg_synchro.cpp b/src/bindings/java/jmsg_synchro.cpp index ca24ac82e0..7caebe7d87 100644 --- a/src/bindings/java/jmsg_synchro.cpp +++ b/src/bindings/java/jmsg_synchro.cpp @@ -6,10 +6,12 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include + #include "jmsg.h" -#include "xbt/synchro_core.h" #include "jmsg_synchro.h" #include "jxbt_utilities.h" +#include "xbt/synchro.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg); @@ -29,15 +31,12 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Mutex_init(JNIEnv * env, jobject obj } JNIEXPORT void JNICALL Java_org_simgrid_msg_Mutex_acquire(JNIEnv * env, jobject obj) { - xbt_mutex_t mutex; - - mutex = (xbt_mutex_t) (uintptr_t) env->GetLongField(obj, jsyncro_field_Mutex_bind); - xbt_ex_t e; - TRY { + xbt_mutex_t mutex = (xbt_mutex_t) (uintptr_t) env->GetLongField(obj, jsyncro_field_Mutex_bind); + try { xbt_mutex_acquire(mutex); } - CATCH(e) { - xbt_ex_free(e); + catch(xbt_ex& e) { + // Nothing to do } }