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 16:04:43 +0000 (16:04 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 21 Sep 2007 16:04:43 +0000 (16:04 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4681 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/simix/smx_process.c

index 495e879..f539ee8 100644 (file)
@@ -300,10 +300,10 @@ void SIMIX_process_suspend(smx_process_t process)
     }
   } else {
     /* process executing, I can create an action and suspend it */
-    process->simdata->suspended = 1;
     smx_action_t dummy;
     smx_cond_t cond;
     char name[] = "dummy";
+    process->simdata->suspended = 1;
 
     cond = SIMIX_cond_init();
     dummy = SIMIX_action_execute(SIMIX_process_get_host(process), name, 0);
@@ -340,11 +340,11 @@ void SIMIX_process_resume(smx_process_t process)
     simdata->suspended = 0;    /* He'll wake up by itself */
     return;
   } else if (simdata->cond) {
-    DEBUG0("Resume process blocked on a conditional");
     /* temporaries variables */
     smx_cond_t c;
     xbt_fifo_item_t i;
     smx_action_t act;
+       DEBUG0("Resume process blocked on a conditional");
     simdata->suspended = 0;
     c = simdata->cond;
     xbt_fifo_foreach(c->actions, i, act, smx_action_t) {