From b95d1c14b2c8cd19a5d054134f7956ec8f69f508 Mon Sep 17 00:00:00 2001 From: schnorr Date: Mon, 13 Dec 2010 16:44:52 +0000 Subject: [PATCH] [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 --- src/instr/instr_routing.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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()) -- 2.20.1