Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] separate initialization function from setting the root container
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Fri, 20 Jan 2012 14:14:51 +0000 (15:14 +0100)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Sun, 22 Jan 2012 23:55:24 +0000 (00:55 +0100)
src/instr/instr_paje.c
src/instr/instr_private.h
src/instr/instr_routing.c

index 4b2c731..88a5fb8 100644 (file)
@@ -16,11 +16,15 @@ static xbt_dict_t allContainers = NULL;     /* all created containers indexed by
 xbt_dict_t trivaNodeTypes = NULL;     /* all link types defined */
 xbt_dict_t trivaEdgeTypes = NULL;     /* all host types defined */
 
 xbt_dict_t trivaNodeTypes = NULL;     /* all link types defined */
 xbt_dict_t trivaEdgeTypes = NULL;     /* all host types defined */
 
-void instr_paje_init (container_t root)
+void instr_paje_init (void)
 {
   allContainers = xbt_dict_new_homogeneous(NULL);
   trivaNodeTypes = xbt_dict_new_homogeneous(xbt_free);
   trivaEdgeTypes = xbt_dict_new_homogeneous(xbt_free);
 {
   allContainers = xbt_dict_new_homogeneous(NULL);
   trivaNodeTypes = xbt_dict_new_homogeneous(xbt_free);
   trivaEdgeTypes = xbt_dict_new_homogeneous(xbt_free);
+}
+
+void instr_paje_set_root (container_t root)
+{
   rootContainer = root;
 }
 
   rootContainer = root;
 }
 
index 5888ca7..875fa0f 100644 (file)
@@ -208,7 +208,8 @@ container_t getContainerByName (const char *name);
 char *getContainerIdByName (const char *name);
 char *getVariableTypeIdByName (const char *name, type_t father);
 container_t getRootContainer (void);
 char *getContainerIdByName (const char *name);
 char *getVariableTypeIdByName (const char *name, type_t father);
 container_t getRootContainer (void);
-void instr_paje_init (container_t root);
+void instr_paje_init (void);
+void instr_paje_set_root (container_t root);
 void instr_paje_free (void);
 type_t getRootType (void);
 type_t getContainerType (const char *name, type_t father);
 void instr_paje_free (void);
 type_t getRootType (void);
 type_t getContainerType (const char *name, type_t father);
index 2a1dc65..398d0cd 100644 (file)
@@ -163,8 +163,10 @@ static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t
 static void instr_routing_parse_start_AS (const char*id,const char*routing)
 {
   if (getRootContainer() == NULL){
 static void instr_routing_parse_start_AS (const char*id,const char*routing)
 {
   if (getRootContainer() == NULL){
+    instr_paje_init ();
     container_t root = newContainer (id, INSTR_AS, NULL);
     container_t root = newContainer (id, INSTR_AS, NULL);
-    instr_paje_init (root);
+    instr_paje_set_root (root);
+
 
     if (TRACE_smpi_is_enabled()) {
       if (!TRACE_smpi_is_grouped()){
 
     if (TRACE_smpi_is_enabled()) {
       if (!TRACE_smpi_is_grouped()){