X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e64d6da8afc98eb8ea9838e48735e01e922863fc..4d5c6aed22b8ae1c8a73cd04d8ab800322d177bf:/src/kernel/context/ContextRaw.cpp diff --git a/src/kernel/context/ContextRaw.cpp b/src/kernel/context/ContextRaw.cpp index d98470bb5e..93d7d86824 100644 --- a/src/kernel/context/ContextRaw.cpp +++ b/src/kernel/context/ContextRaw.cpp @@ -303,8 +303,9 @@ void SerialRawContext::suspend() void SerialRawContext::resume() { + RawContext* old = static_cast(self()); Context::set_current(this); - RawContext::swap(RawContext::get_maestro(), this); + RawContext::swap(old, this); } void SerialRawContext::run_all() @@ -374,7 +375,7 @@ void ParallelRawContext::suspend() void ParallelRawContext::resume() { worker_id_ = threads_working_.fetch_add(1, std::memory_order_relaxed); - ParallelRawContext* worker_context = static_cast(SIMIX_context_self()); + ParallelRawContext* worker_context = static_cast(self()); workers_context_[worker_id_] = worker_context; XBT_DEBUG("Saving worker stack %zu", worker_id_); Context::set_current(this);