Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Useless cleanups
[simgrid.git] / src / surf / workstation_ptask_L07.c
index ac34f93..425a720 100644 (file)
@@ -322,7 +322,7 @@ static void update_resource_state(void *id,
   link_L07_t nw_link = id;
 
   if (nw_link->type == SURF_WORKSTATION_RESOURCE_LINK) {
-    DEBUG2("Updating link %s (%p)", nw_link->generic_resource.name, nw_link);
+    DEBUG2("Updating link %s (%p)", surf_resource_name(nw_link), nw_link);
     if (event_type == nw_link->bw_event) {
       nw_link->bw_current = value;
       lmm_update_constraint_bound(ptask_maxmin_system, nw_link->constraint,
@@ -352,7 +352,7 @@ static void update_resource_state(void *id,
     }
     return;
   } else if (cpu->type == SURF_WORKSTATION_RESOURCE_CPU) {
-    DEBUG3("Updating cpu %s (%p) with value %g", cpu->generic_resource.name, cpu, value);
+    DEBUG3("Updating cpu %s (%p) with value %g", surf_resource_name(cpu), cpu, value);
     if (event_type == cpu->power_event) {
       cpu->power_current = value;
       lmm_update_constraint_bound(ptask_maxmin_system, cpu->constraint,
@@ -384,7 +384,7 @@ static void finalize(void)
   surf_network_model = NULL;
   used_routing->finalize();
 
-  host_count = 0; // FIXME: KILLME?
+  host_count = 0;
 
   if (ptask_maxmin_system) {
     lmm_system_free(ptask_maxmin_system);
@@ -542,7 +542,7 @@ static surf_action_t action_sleep(void *cpu, double duration)
 {
   surf_action_workstation_L07_t action = NULL;
 
-  XBT_IN2("(%s,%g)", ((cpu_L07_t) cpu)->generic_resource.name, duration);
+  XBT_IN2("(%s,%g)", surf_resource_name(cpu), duration);
 
   action = (surf_action_workstation_L07_t) execute(cpu, 1.0);
   action->generic_action.max_duration = duration;
@@ -629,7 +629,7 @@ static void parse_cpu_init(void)
 
   power_scale = get_cpu_power(A_surfxml_host_power);
   surf_parse_get_double(&power_initial, A_surfxml_host_availability);
 surf_parse_get_trace(&power_trace, A_surfxml_host_availability_file);
power_trace = tmgr_trace_new(A_surfxml_host_availability_file);
 
   xbt_assert0((A_surfxml_host_state == A_surfxml_host_state_ON) ||
               (A_surfxml_host_state == A_surfxml_host_state_OFF),
@@ -638,7 +638,7 @@ static void parse_cpu_init(void)
     state_initial = SURF_RESOURCE_ON;
   if (A_surfxml_host_state == A_surfxml_host_state_OFF)
     state_initial = SURF_RESOURCE_OFF;
-  surf_parse_get_trace(&state_trace, A_surfxml_host_state_file);
+  state_trace = tmgr_trace_new(A_surfxml_host_state_file);
 
   current_property_set = xbt_dict_new();
   cpu_new(A_surfxml_host_id, power_scale, power_initial, power_trace,
@@ -702,9 +702,9 @@ static void parse_link_init(void)
 
   name_link = xbt_strdup(A_surfxml_link_id);
   surf_parse_get_double(&bw_initial, A_surfxml_link_bandwidth);
-  surf_parse_get_trace(&bw_trace, A_surfxml_link_bandwidth_file);
+  bw_trace = tmgr_trace_new(A_surfxml_link_bandwidth_file);
   surf_parse_get_double(&lat_initial, A_surfxml_link_latency);
-  surf_parse_get_trace(&lat_trace, A_surfxml_link_latency_file);
+  lat_trace = tmgr_trace_new(A_surfxml_link_latency_file);
 
   xbt_assert0((A_surfxml_link_state == A_surfxml_link_state_ON)
               || (A_surfxml_link_state ==
@@ -720,7 +720,7 @@ static void parse_link_init(void)
            A_surfxml_link_sharing_policy_FATPIPE)
     policy_initial_link = SURF_LINK_FATPIPE;
 
-  surf_parse_get_trace(&state_trace, A_surfxml_link_state_file);
+  state_trace = tmgr_trace_new(A_surfxml_link_state_file);
 
   current_property_set = xbt_dict_new();
   link_new(name_link, bw_initial, bw_trace, lat_initial, lat_trace,