From: Lucas Schnorr Date: Fri, 20 Jan 2012 14:13:36 +0000 (+0100) Subject: [trace] function to remove a child from its parent container X-Git-Tag: exp_20120216~119^2~60 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1812accaed347769b9ee20df400ba1935c754a96 [trace] function to remove a child from its parent container --- diff --git a/src/instr/instr_paje.c b/src/instr/instr_paje.c index 8d6cf31aec..4b2c73119c 100644 --- a/src/instr/instr_paje.c +++ b/src/instr/instr_paje.c @@ -310,6 +310,17 @@ type_t getType (const char *name, type_t father) return recursiveGetType (name, father); } +void removeContainerFromParent (container_t child) +{ + container_t parent = child->father; + if (parent){ + XBT_DEBUG("removeChildContainer (%s) FromContainer (%s) ", + child->name, + parent->name); + xbt_dict_remove (parent->children, child->name); + } +} + void destroyContainer (container_t container) { XBT_DEBUG("destroy container %s", container->name); diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index 896e7dfa41..5888ca723f 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -219,6 +219,7 @@ type_t getStateType (const char *name, type_t father); type_t getType (const char *name, type_t father); val_t getValue (const char *valuename, const char *color, type_t father); val_t getValueByName (const char *valuename, type_t father); +void removeContainerFromParent (container_t child); void destroyContainer (container_t container); void destroyAllContainers (void);