X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/836d550dd0e6a85294e877cf7129b865bc0cb561..aa9cfa5743045b941f3afca368462ea2be992a5f:/src/kernel/context/ContextSwapped.cpp diff --git a/src/kernel/context/ContextSwapped.cpp b/src/kernel/context/ContextSwapped.cpp index cb2f31487d..87da1fcf61 100644 --- a/src/kernel/context/ContextSwapped.cpp +++ b/src/kernel/context/ContextSwapped.cpp @@ -134,9 +134,16 @@ SwappedContext::~SwappedContext() xbt_free(stack_); } +void SwappedContext::set_maestro(SwappedContext* ctx) +{ + if (factory_->threads_working_ == 0) // Don't save the soul of minions, only the one of maestro + factory_->workers_context_[0] = ctx; +} + void SwappedContext::stop() { Context::stop(); + /* We must cut the actor execution using an exception to properly free the C++ RAII variables */ throw StopRequest(); }