/* 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 <xbt/ex.hpp>
+
#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);
}
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
}
}