Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] new static function to declare a new link type (checking if it already exists)
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Dec 2010 16:44:52 +0000 (16:44 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Dec 2010 16:44:52 +0000 (16:44 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9184 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/instr/instr_routing.c

index d01481e..d2ae63e 100644 (file)
@@ -73,6 +73,15 @@ static void newVariableType (const char *type, const char *parentType, const cha
   }
 }
 
+static void newLinkType (const char *type, const char *parentType, const char *sourceType, const char *destType, const char *name)
+{
+  char *defined = xbt_dict_get_or_null (defined_types, type);
+  if (!defined){
+    pajeDefineLinkType(type, parentType, sourceType, destType, name);
+    xbt_dict_set(defined_types, type, xbt_strdup("1"), xbt_free);
+  }
+}
+
 void instr_routing_define_callbacks ()
 {
   if (!TRACE_is_active())