Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This variable is used only with contexts, not with pthreads
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 5 Sep 2005 22:31:47 +0000 (22:31 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 5 Sep 2005 22:31:47 +0000 (22:31 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1686 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/context.c

index e67c2ce..b8b4ba5 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) ---------",
@@ -66,6 +64,9 @@ static void __xbt_context_yield(xbt_context_t context)
   if(context) VOIRP(context->save);
   if (context) {
     if(context->save==NULL) {
+
+      int return_value = 0;
+
       DEBUG0("**** Yielding to somebody else ****");
       DEBUG2("Saving current_context value (%p) to context(%p)->save",current_context,context);
       context->save = current_context ;