Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Replaced all task->name by MSG_task_get_name(task)
[simgrid.git] / examples / msg / msg_test.c
index 388e087..cec9680 100644 (file)
@@ -117,14 +117,14 @@ int slave(int argc, char *argv[])
     int a;
     a = MSG_task_get(&(task), PORT_22);
     if (a == MSG_OK) {
-      INFO1("Received \"%s\" ", task->name);
-      INFO1("Processing \"%s\" ", task->name);
+      INFO1("Received \"%s\" ", MSG_task_get_name(task));
+      INFO1("Processing \"%s\" ", MSG_task_get_name(task));
       MSG_task_execute(task);
-      INFO1("\"%s\" done ", task->name);
+      INFO1("\"%s\" done ", MSG_task_get_name(task));
       MSG_task_destroy(task);
     } else {
       INFO0("Hey ?! What's up ? ");
-      xbt_assert0(0,"Unexpected behaviour");
+      xbt_assert0(0,"Unexpected behavior");
     }
   }
   INFO0("I'm done. See you!");
@@ -159,15 +159,15 @@ int forwarder(int argc, char *argv[])
     int a;
     a = MSG_task_get(&(task), PORT_22);
     if (a == MSG_OK) {
-      INFO1("Received \"%s\" ", task->name);
+      INFO1("Received \"%s\" ", MSG_task_get_name(task));
       INFO2("Sending \"%s\" to \"%s\"",
-                   task->name,
+                   MSG_task_get_name(task),
                    slaves[i % slaves_count]->name);
       MSG_task_put(task, slaves[i % slaves_count],
                   PORT_22);
     } else {
       INFO0("Hey ?! What's up ? ");
-      xbt_assert0(0,"Unexpected behaviour");
+      xbt_assert0(0,"Unexpected behavior");
     }
   }
 
@@ -194,7 +194,7 @@ void test_all(const char *platform_file,const char *application_file)
   }
   MSG_main();
   
-  INFO1("Simulation time %g",MSG_getClock());
+  INFO1("Simulation time %g",MSG_get_clock());
 } /* end_of_test_all */