Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Useless cleanups
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Jul 2009 15:29:42 +0000 (15:29 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Jul 2009 15:29:42 +0000 (15:29 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6488 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/cpu.c
src/surf/workstation_ptask_L07.c

index c2d01b5..d8580f8 100644 (file)
@@ -249,7 +249,7 @@ static surf_action_t execute(void *cpu, double size)
   surf_action_cpu_Cas01_t action = NULL;
   cpu_Cas01_t CPU = cpu;
 
-  XBT_IN2("(%s,%g)", CPU->generic_resource.name, size);
+  XBT_IN2("(%s,%g)", surf_resource_name(CPU), size);
   action = surf_action_new(sizeof(s_surf_action_cpu_Cas01_t),size,surf_cpu_model,
       CPU->state_current != SURF_RESOURCE_ON);
 
@@ -271,7 +271,7 @@ static surf_action_t action_sleep(void *cpu, double duration)
   if (duration > 0)
     duration = MAX(duration, MAXMIN_PRECISION);
 
-  XBT_IN2("(%s,%g)", ((cpu_Cas01_t) cpu)->generic_resource.name, duration);
+  XBT_IN2("(%s,%g)", surf_resource_name(cpu), duration);
   action = (surf_action_cpu_Cas01_t) execute(cpu, 1.0);
   action->generic_action.max_duration = duration;
   action->suspended = 2;
index ba86059..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;