A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unify how threaded and parallelisable context factories find context_self
[simgrid.git]
/
src
/
kernel
/
context
/
ContextThread.cpp
diff --git
a/src/kernel/context/ContextThread.cpp
b/src/kernel/context/ContextThread.cpp
index
ab20215
..
c93e361
100644
(file)
--- a/
src/kernel/context/ContextThread.cpp
+++ b/
src/kernel/context/ContextThread.cpp
@@
-78,7
+78,7
@@
ThreadContext::ThreadContext(std::function<void()> code, void_pfn_smxprocess_t c
/* Otherwise, we attach to the current thread */
else {
/* 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<ThreadContext*>(param);
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. */
#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();
ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_;
maestro->end_.acquire();
-
xbt_os_thread_set_extra_data
(nullptr);
+
SIMIX_context_set_current
(nullptr);
}
// SerialThreadContext
}
// SerialThreadContext