Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Let it work both with 64bit contextes, and with plain threads
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 22 Mar 2007 14:57:44 +0000 (14:57 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 22 Mar 2007 14:57:44 +0000 (14:57 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3334 48e7efb5-ca39-0410-a469-dd3cf9ba447f

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) {
 
 static void *
 __context_wrapper(void* c) {
-       xbt_context_t context = (xbt_context_t) current_context;
+       xbt_context_t context = current_context;
        
        #ifdef CONTEXT_THREADS
        
        #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);
        context->thread = xbt_thread_self();
         
        DEBUG3("**[ctx:%p;self:%p]** Lock creation_mutex %p ****",context,(void*)xbt_thread_self(), creation_mutex);