Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fixup the context build
[simgrid.git] / src / xbt / context.c
index e67c2ce..a88d8ef 100644 (file)
@@ -35,8 +35,6 @@ static xbt_swag_t context_living = NULL;
 
 static void __xbt_context_yield(xbt_context_t context)
 {
-  int return_value = 0;
-
   xbt_assert0(current_context,"You have to call context_init() first.");
   
   DEBUG2("--------- current_context (%p) is yielding to context(%p) ---------",
@@ -65,6 +63,9 @@ static void __xbt_context_yield(xbt_context_t context)
   VOIRP(context);
   if(context) VOIRP(context->save);
   if (context) {
+
+    int return_value = 0;
+
     if(context->save==NULL) {
       DEBUG0("**** Yielding to somebody else ****");
       DEBUG2("Saving current_context value (%p) to context(%p)->save",current_context,context);