Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
factorize where seq_runall and par_runall save maestro context
[simgrid.git] / src / kernel / context / ContextUnix.cpp
index de85d2f..8bb3202 100644 (file)
@@ -55,8 +55,7 @@ UContext::UContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_fun
 #endif
     UContext::make_ctx(&this->uc_, UContext::smx_ctx_sysv_wrapper, this);
   } else {
-    if (process != nullptr && get_maestro() == nullptr)
-      set_maestro(this);
+    set_maestro(this); // save maestro for run_all()
   }
 
 #if SIMGRID_HAVE_MC