X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4c206c2ab2737c12672b8bc7aab7b0ea2cc99484..c641d112f8a557b61ff14c261931077773f21fbd:/src/kernel/context/ContextRaw.cpp diff --git a/src/kernel/context/ContextRaw.cpp b/src/kernel/context/ContextRaw.cpp index fe8243da01..8d320a164c 100644 --- a/src/kernel/context/ContextRaw.cpp +++ b/src/kernel/context/ContextRaw.cpp @@ -206,17 +206,12 @@ RawContext::RawContext(std::function code, void_pfn_smxprocess_t cleanup #endif this->stack_top_ = raw_makecontext(this->stack_, smx_context_usable_stack_size, RawContext::wrapper, this); } else { - if (process != nullptr && get_maestro() == nullptr) - set_maestro(this); - if (MC_is_active()) { - XBT_ATTRIB_UNUSED RawContext* maestro = static_cast(get_maestro()); - MC_ignore_heap(&maestro->stack_top_, sizeof(maestro->stack_top_)); - } + set_maestro(this); // save maestro for run_all() + if (MC_is_active()) + MC_ignore_heap(&stack_top_, sizeof(stack_top_)); } } -RawContext::~RawContext() = default; - void RawContext::wrapper(void* arg) { RawContext* context = static_cast(arg);