Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use a bit more informative actions'names. Helpful while debuging
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 20 Oct 2009 13:09:10 +0000 (13:09 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 20 Oct 2009 13:09:10 +0000 (13:09 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6804 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/simix/smx_synchro.c

index 68b121a..8dd790c 100644 (file)
@@ -187,6 +187,7 @@ void SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex)
   
   /* Always create an action null in case there is a host failure */
   act_sleep = SIMIX_action_sleep(SIMIX_host_self(), -1);
+  SIMIX_action_set_name(act_sleep,bprintf("Wait condition %p", cond));
   SIMIX_process_self()->waiting_action = act_sleep;
   SIMIX_register_action_to_condition(act_sleep, cond);
   __SIMIX_cond_wait(cond);
@@ -247,6 +248,7 @@ void SIMIX_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex,
 
   if (max_duration >= 0) {
     act_sleep = SIMIX_action_sleep(SIMIX_host_self(), max_duration);
+    SIMIX_action_set_name(act_sleep,bprintf("Timed wait condition %p (max_duration:%f)", cond,max_duration));
     SIMIX_register_action_to_condition(act_sleep, cond);
     SIMIX_process_self()->waiting_action = act_sleep;
     __SIMIX_cond_wait(cond);