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 5ff074a..7987779 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_;
 }