Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Declaration of the variables at the begining of the functions
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 21 Sep 2007 15:53:48 +0000 (15:53 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 21 Sep 2007 15:53:48 +0000 (15:53 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4668 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/context.c

index 571b01d..8e3778a 100644 (file)
@@ -361,7 +361,8 @@ void xbt_context_empty_trash(void)
 
 static void __xbt_context_yield(xbt_context_t context)
 {
-  xbt_assert0(current_context, "You have to call context_init() first.");
+  xbt_context_t self;
+xbt_assert0(current_context, "You have to call context_init() first.");        
   xbt_assert0(context,"Invalid argument");
 
   if (current_context == context) {
@@ -373,7 +374,7 @@ static void __xbt_context_yield(xbt_context_t context)
   }
 
 #ifdef CONTEXT_THREADS
-  xbt_context_t self = current_context;
+  self = current_context;
   DEBUG2("[%p] **** Locking ctx %p ****", self, context);
   xbt_os_mutex_lock(context->mutex);
   DEBUG1("[%p] **** Updating current_context ****", self);