Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Let it work both with 64bit contextes, and with plain threads
[simgrid.git] / src / xbt / context.c
index 56936cd..8593ea9 100644 (file)
@@ -180,9 +180,10 @@ static void __context_exit(xbt_context_t context ,int value)
 
 static void *
 __context_wrapper(void* c) {
-       xbt_context_t context = (xbt_context_t) current_context;
+       xbt_context_t context = current_context;
        
        #ifdef CONTEXT_THREADS
+       context = (xbt_context_t)c;
        context->thread = xbt_thread_self();
         
        DEBUG3("**[ctx:%p;self:%p]** Lock creation_mutex %p ****",context,(void*)xbt_thread_self(), creation_mutex);