Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
task->counter is initialized only when HAVE_TRACING.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 19 May 2014 09:29:53 +0000 (11:29 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 20 May 2014 14:16:50 +0000 (16:16 +0200)
Use task pointer instead to compute the key.

src/msg/msg_vm.c

index c45ad9c..7972de2 100644 (file)
@@ -503,7 +503,7 @@ void MSG_host_add_task(msg_host_t host, msg_task_t task)
 {
   msg_host_priv_t priv = msg_host_resource_priv(host);
   double remaining = MSG_task_get_remaining_computation(task);
-  char *key = bprintf("%s-%lld", task->name, task->counter);
+  char *key = bprintf("%s-%p", task->name, task);
 
   dirty_page_t dp = xbt_new0(s_dirty_page, 1);
   dp->task = task;
@@ -525,7 +525,7 @@ void MSG_host_del_task(msg_host_t host, msg_task_t task)
 {
   msg_host_priv_t priv = msg_host_resource_priv(host);
 
-  char *key = bprintf("%s-%lld", task->name, task->counter);
+  char *key = bprintf("%s-%p", task->name, task);
 
   dirty_page_t dp = xbt_dict_get_or_null(priv->dp_objs, key);
   xbt_assert(dp->task == task);