/* Otherwise, we attach to the current thread */
else {
- xbt_os_thread_set_extra_data(this);
+ SIMIX_context_set_current(this);
}
}
void *ThreadContext::wrapper(void *param)
{
ThreadContext* context = static_cast<ThreadContext*>(param);
+ SIMIX_context_set_current(context);
#ifndef WIN32
/* Install alternate signal stack, for SIGSEGV handler. */
ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_;
maestro->end_.acquire();
- xbt_os_thread_set_extra_data(nullptr);
+ SIMIX_context_set_current(nullptr);
}
// SerialThreadContext