Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
unify how threaded and parallelisable context factories find context_self
[simgrid.git] / src / bindings / java / jmsg.cpp
index 5ff074acd600dc9eb251a6d4bf7751410d7a13ed..7987779dcd76c1bf15e56886f14d4b18511ae333 100644 (file)
@@ -50,7 +50,7 @@ JavaVM *__java_vm = nullptr;
 JNIEnv *get_current_thread_env()
 {
   using simgrid::kernel::context::JavaContext;
-  JavaContext* ctx = static_cast<JavaContext*>(xbt_os_thread_get_extra_data());
+  JavaContext* ctx = static_cast<JavaContext*>(SIMIX_context_self());
   return ctx->jenv_;
 }