From: schnorr Date: Mon, 13 Dec 2010 16:44:52 +0000 (+0000) Subject: [trace] new static function to declare a new link type (checking if it already exists) X-Git-Tag: v3.6_beta2~739 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b95d1c14b2c8cd19a5d054134f7956ec8f69f508?hp=89782b59c2b44de658a46b7f6262075b723cf9b1 [trace] new static function to declare a new link type (checking if it already exists) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9184 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/instr/instr_routing.c b/src/instr/instr_routing.c index d01481e101..d2ae63e9a5 100644 --- a/src/instr/instr_routing.c +++ b/src/instr/instr_routing.c @@ -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())