X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/207e186001374b77093f4064a2a25a9c626a989d..c68caf0f27b0fdde9df0a39857e5a162fc196d85:/src/kernel/context/ContextThread.cpp?ds=sidebyside diff --git a/src/kernel/context/ContextThread.cpp b/src/kernel/context/ContextThread.cpp index ab202159bd..c93e361daf 100644 --- a/src/kernel/context/ContextThread.cpp +++ b/src/kernel/context/ContextThread.cpp @@ -78,7 +78,7 @@ ThreadContext::ThreadContext(std::function code, void_pfn_smxprocess_t c /* Otherwise, we attach to the current thread */ else { - xbt_os_thread_set_extra_data(this); + SIMIX_context_set_current(this); } } @@ -91,6 +91,7 @@ ThreadContext::~ThreadContext() void *ThreadContext::wrapper(void *param) { ThreadContext* context = static_cast(param); + SIMIX_context_set_current(context); #ifndef WIN32 /* Install alternate signal stack, for SIGSEGV handler. */ @@ -177,7 +178,7 @@ void ThreadContext::attach_stop() ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_; maestro->end_.acquire(); - xbt_os_thread_set_extra_data(nullptr); + SIMIX_context_set_current(nullptr); } // SerialThreadContext