From: Arnaud Giersch Date: Mon, 21 Jan 2019 11:57:01 +0000 (+0100) Subject: Avoid TSan false positives. X-Git-Tag: v3_22~515 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/98a765c83c264f3551035bc981f0bc299442dd63 Avoid TSan false positives. --- diff --git a/src/kernel/context/ContextSwapped.cpp b/src/kernel/context/ContextSwapped.cpp index 100dcba71c..3c8974394e 100644 --- a/src/kernel/context/ContextSwapped.cpp +++ b/src/kernel/context/ContextSwapped.cpp @@ -52,7 +52,7 @@ SwappedContext::SwappedContext(std::function code, void_pfn_smxprocess_t : Context(std::move(code), cleanup_func, process), factory_(factory) { // Save maestro (=context created first) in preparation for run_all - if (factory_->workers_context_[0] == nullptr) + if (not factory->parallel_ && factory_->workers_context_[0] == nullptr) factory_->workers_context_[0] = this; if (has_code()) {