Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / examples / msg / trace-link-srcdst-user-variables / trace-link-srcdst-user-variables.c
index ba3eb08..198f153 100644 (file)
@@ -8,15 +8,10 @@
 
 /** @addtogroup MSG_examples
  *
- * - <b>tracing/link_srcdst_user_variables.c</b>: This program demonstrates how to trace user variables associated to
- * the links of the platform file. Instead of providing the name of the link to update one of its variable, this
- * example shows how to provide two hosts as parameter (source and destination, use their names as defined in the
- * platform file). The tracing mechanism will get the route between these two hosts, if there is one defined in the
- * platform file, and update the variable of all the links of that route to the value provided.
- * You might want to run this program with the following parameters:
- * --cfg=tracing:yes
- * --cfg=tracing/platform:yes
- * (See \ref tracing_tracing_options for details)
+ * - <b>Routes: trace-link-srcdst-user-variables/trace-link-srcdst-user-variables.c</b>. Instead of providing the name
+ *   of the link to update one of its variable, this example shows how to provide two hosts as parameter (source and
+ *   destination, as defined in the platform file). The tracing mechanism will get the route between these two hosts, if
+ *   it is defined in the platform file, and update the variable of all the links of that route to the value provided.
  */
 
 //dump function to create and execute a task
@@ -27,7 +22,7 @@ static void create_and_execute_task (void)
   MSG_task_destroy (task);
 }
 
-static int master(int argc, char *argv[])
+static int trace_fun(int argc, char *argv[])
 {
   //Set initial values for the link user variables
   //This example uses source and destination where source and destination are the name of hosts inthe platform file.
@@ -73,9 +68,9 @@ int main(int argc, char *argv[])
   TRACE_link_variable_declare("Link_Capacity");
   TRACE_link_variable_declare_with_color ("Link_Utilization", "0.9 0.1 0.1");
 
-  //register "master" and "slave" functions and launch deployment
-  MSG_function_register("master", master);
-  MSG_function_register("slave", master);
+  //register functions and launch deployment
+  MSG_function_register("master", trace_fun);
+  MSG_function_register("worker", trace_fun);
   MSG_launch_application(argv[2]);
 
   MSG_main();