From: Martin Quinson Date: Tue, 21 Mar 2017 23:36:50 +0000 (+0100) Subject: Allow maestro to do simcalls in the Java world too X-Git-Tag: v3_15~22 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/305e08dd2540700b416c3f60be7b4d894020dc7f Allow maestro to do simcalls in the Java world too The detection of whether we are in maestro was broken in the JavaContext, leading to an incredible mayhem in my code... Gosh, that JNI code is the ultimate masochist experience. --- diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index 35c9c0a7c0..d4c4ad6981 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -693,5 +693,6 @@ void SIMIX_display_process_status() int SIMIX_is_maestro() { - return simix_global==nullptr /*SimDag*/|| SIMIX_process_self() == simix_global->maestro_process; + smx_actor_t self = SIMIX_process_self(); + return simix_global == nullptr /*SimDag*/ || self == nullptr || self == simix_global->maestro_process; }