Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ensure windows combatibility.
authorNavarrop <Pierre.Navarro@imag.fr>
Wed, 26 Oct 2011 14:26:03 +0000 (16:26 +0200)
committerNavarrop <Pierre.Navarro@imag.fr>
Wed, 26 Oct 2011 14:26:03 +0000 (16:26 +0200)
s_host is already an used variable.

src/include/surf/surfxml_parse_values.h
src/instr/instr_routing.c
src/surf/surfxml_parse.c

index 782c2d8..1d9c5eb 100644 (file)
@@ -1,9 +1,8 @@
-/*
- * surfxml_parse_values.h
- *
- *  Created on: 24 oct. 2011
- *      Author: navarrop
- */
+/* Copyright (c) 2011. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #ifndef SURFXML_PARSE_VALUES_H_
 #define SURFXML_PARSE_VALUES_H_
 
 #ifndef SURFXML_PARSE_VALUES_H_
 #define SURFXML_PARSE_VALUES_H_
@@ -56,8 +55,8 @@ typedef struct s_router {
        char* V_router_coord;
 } s_router_t;
 
        char* V_router_coord;
 } s_router_t;
 
-typedef struct s_host *host_t;
-typedef struct s_host {
+typedef struct s_hostSG *hostSG_t;
+typedef struct s_hostSG {
        char* V_host_id;                                                                                                        //id
        double V_host_power_peak;                                                                                       //power
        int V_host_core;                                                                                                        //core
        char* V_host_id;                                                                                                        //id
        double V_host_power_peak;                                                                                       //power
        int V_host_core;                                                                                                        //core
@@ -66,9 +65,9 @@ typedef struct s_host {
        e_surf_resource_state_t V_host_state_initial;                                           //state
        tmgr_trace_t V_host_state_trace;                                                                        //state file
        char* V_host_coord;
        e_surf_resource_state_t V_host_state_initial;                                           //state
        tmgr_trace_t V_host_state_trace;                                                                        //state file
        char* V_host_coord;
-} s_host_t;
+} s_hostSG_t;
 
 
-extern host_t struct_host;
+extern hostSG_t struct_host;
 extern router_t struct_router;
 extern cluster_t struct_cluster;
 extern peer_t struct_peer;
 extern router_t struct_router;
 extern cluster_t struct_cluster;
 extern peer_t struct_peer;
index 4371113..744d904 100644 (file)
@@ -190,19 +190,19 @@ static void instr_routing_parse_start_link ()
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
 
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
 
-  double bandwidth_value = lnk->V_link_bandwidth;
-  double latency_value = lnk->V_link_latency;
+  double bandwidth_value = struct_lnk->V_link_bandwidth;
+  double latency_value = struct_lnk->V_link_latency;
   xbt_dynar_t links_to_create = xbt_dynar_new (sizeof(char*), &xbt_free_ref);
 
   xbt_dynar_t links_to_create = xbt_dynar_new (sizeof(char*), &xbt_free_ref);
 
-  if (lnk->V_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX){
-    char *up = bprintf("%s_UP", lnk->V_link_id);
-    char *down = bprintf("%s_DOWN", lnk->V_link_id);
+  if (struct_lnk->V_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX){
+    char *up = bprintf("%s_UP", struct_lnk->V_link_id);
+    char *down = bprintf("%s_DOWN", struct_lnk->V_link_id);
     xbt_dynar_push_as (links_to_create, char*, xbt_strdup(up));
     xbt_dynar_push_as (links_to_create, char*, xbt_strdup(down));
     free (up);
     free (down);
   }else{
     xbt_dynar_push_as (links_to_create, char*, xbt_strdup(up));
     xbt_dynar_push_as (links_to_create, char*, xbt_strdup(down));
     free (up);
     free (down);
   }else{
-    xbt_dynar_push_as (links_to_create, char*, strdup(lnk->V_link_id));
+    xbt_dynar_push_as (links_to_create, char*, strdup(struct_lnk->V_link_id));
   }
 
   char *link_name = NULL;
   }
 
   char *link_name = NULL;
@@ -232,11 +232,11 @@ static void instr_routing_parse_end_link ()
 static void instr_routing_parse_start_host ()
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
 static void instr_routing_parse_start_host ()
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
-  container_t new = newContainer (host->V_host_id, INSTR_HOST, father);
+  container_t new = newContainer (struct_host->V_host_id, INSTR_HOST, father);
 
   if (TRACE_categorized() || TRACE_uncategorized()) {
     type_t power = getVariableType ("power", NULL, new->type);
 
   if (TRACE_categorized() || TRACE_uncategorized()) {
     type_t power = getVariableType ("power", NULL, new->type);
-    new_pajeSetVariable (0, new, power, host->V_host_power_peak);
+    new_pajeSetVariable (0, new, power, struct_host->V_host_power_peak);
   }
   if (TRACE_uncategorized()){
     getVariableType ("power_used", "0.5 0.5 0.5", new->type);
   }
   if (TRACE_uncategorized()){
     getVariableType ("power_used", "0.5 0.5 0.5", new->type);
@@ -277,7 +277,7 @@ static void instr_routing_parse_end_host ()
 static void instr_routing_parse_start_router ()
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
 static void instr_routing_parse_start_router ()
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
-  newContainer (router->V_router_id, INSTR_ROUTER, father);
+  newContainer (struct_router->V_router_id, INSTR_ROUTER, father);
 }
 
 static void instr_routing_parse_end_router ()
 }
 
 static void instr_routing_parse_end_router ()
index e6732d8..a6eb9ab 100644 (file)
@@ -11,7 +11,7 @@
 #include "surf/surfxml_parse_private.h"
 #include "surf/surf_private.h"
 
 #include "surf/surfxml_parse_private.h"
 #include "surf/surf_private.h"
 
-host_t struct_host;
+hostSG_t struct_host;
 router_t struct_router;
 cluster_t struct_cluster;
 peer_t struct_peer;
 router_t struct_router;
 cluster_t struct_cluster;
 peer_t struct_peer;
@@ -314,7 +314,7 @@ void STag_surfxml_platform(void)
 
 void STag_surfxml_host(void){
 //     XBT_INFO("STag_surfxml_host [%s]",A_surfxml_host_id);
 
 void STag_surfxml_host(void){
 //     XBT_INFO("STag_surfxml_host [%s]",A_surfxml_host_id);
-       struct_host = xbt_new0(s_host_t, 1);
+       struct_host = xbt_new0(s_hostSG_t, 1);
        struct_host->V_host_id = xbt_strdup(A_surfxml_host_id);
        struct_host->V_host_power_peak = get_cpu_power(A_surfxml_host_power);
        surf_parse_get_double(&(struct_host->V_host_power_scale), A_surfxml_host_availability);
        struct_host->V_host_id = xbt_strdup(A_surfxml_host_id);
        struct_host->V_host_power_peak = get_cpu_power(A_surfxml_host_power);
        surf_parse_get_double(&(struct_host->V_host_power_scale), A_surfxml_host_availability);