From 509b9a6e5012607ed3e1b4e8ba5d1341d47f9f18 Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 2 Jul 2009 08:00:34 +0000 Subject: [PATCH] Kill SD_link_get_properties: hard to maintain and makes very little sense (Shout out if you used it.) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6441 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- ChangeLog | 6 +++++- include/simdag/simdag.h | 22 +++++++++------------- src/simdag/sd_link.c | 27 --------------------------- 3 files changed, 14 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a73949bcb..b78d7de45a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,7 +38,11 @@ SimGrid (3.3.2-svn) unstable; urgency=low * Improve the action object model - implement a constructor avoiding dupplicated code about field initialization in generic_action part. - + + SimDag: + * Kill SD_link_get_properties: hard to maintain and makes very little sense + Shout out if you used it. + XBT: * Add xbt_set_get_by_name_or_null() [Silas De Munck] * Add xbt_graph_node_get_outedges() [Silas De Munck] diff --git a/include/simdag/simdag.h b/include/simdag/simdag.h index a99999af05..f5b9bcbb08 100644 --- a/include/simdag/simdag.h +++ b/include/simdag/simdag.h @@ -12,9 +12,9 @@ SG_BEGIN_DECL() /************************** Link handling ***********************************/ /** @defgroup SD_link_management Links * @brief Functions for managing the network links - * + * * This section describes the functions for managing the network links. - * + * * A link is a network node represented as a name, a current * bandwidth and a current latency. The links are created * when you call the function SD_create_environment. @@ -31,19 +31,15 @@ XBT_PUBLIC(double) SD_link_get_current_bandwidth(SD_link_t link); XBT_PUBLIC(double) SD_link_get_current_latency(SD_link_t link); XBT_PUBLIC(e_SD_link_sharing_policy_t) SD_link_get_sharing_policy(SD_link_t link); -/*property handling functions*/ -XBT_PUBLIC(xbt_dict_t) SD_link_get_properties(SD_link_t link); -XBT_PUBLIC(const char *) SD_link_get_property_value(SD_link_t link, - const char *name); /** @} */ /************************** Workstation handling ****************************/ /** @defgroup SD_workstation_management Workstations * @brief Functions for managing the workstations - * + * * This section describes the functions for managing the workstations. - * + * * A workstation is a place where a task can be executed. * A workstation is represented as a physical * resource with computing capabilities and has a name. @@ -99,15 +95,15 @@ XBT_PUBLIC(double) SD_route_get_communication_time(SD_workstation_t src, /** @defgroup SD_task_management Tasks * @brief Functions for managing the tasks - * + * * This section describes the functions for managing the tasks. - * + * * A task is some working amount that can be executed * in parallel on several workstations. A task may depend on other * tasks, this means that the task cannot start until the other tasks are done. * Each task has a \ref e_SD_task_state_t "state" indicating whether * the task is scheduled, running, done, etc. - * + * * @see SD_task_t, SD_task_dependency_management * @{ */ @@ -159,10 +155,10 @@ XBT_PUBLIC(int) SD_task_dependency_exists(SD_task_t src, SD_task_t dst); /** @defgroup SD_simulation Simulation * @brief Functions for creating the environment and launching the simulation - * + * * This section describes the functions for initialising SimDag, launching * the simulation and exiting SimDag. - * + * * @{ */ XBT_PUBLIC(void) SD_init(int *argc, char **argv); diff --git a/src/simdag/sd_link.c b/src/simdag/sd_link.c index 5cc896b82a..9a6d4c75ad 100644 --- a/src/simdag/sd_link.c +++ b/src/simdag/sd_link.c @@ -130,33 +130,6 @@ double SD_link_get_current_bandwidth(SD_link_t link) get_link_bandwidth(link->surf_link); } -/** - * \brief Returns the value of a given link property - * - * \param link the inspected link - * \param name a property name - * \return value of a property (or NULL if property not set) - */ -const char *SD_link_get_property_value(SD_link_t link, const char *name) -{ - return xbt_dict_get_or_null(SD_link_get_properties(link), name); -} - -/** - * \brief Returns a #xbt_dict_t consisting of the list of properties assigned to a link - * - * \param link a link - * \return the dictionary containing the properties associated with the link - */ -xbt_dict_t SD_link_get_properties(SD_link_t link) -{ - SD_CHECK_INIT_DONE(); - xbt_assert0((link != NULL), "Invalid parameters"); - - return surf_resource_properties(link->surf_link); - -} - /** * \brief Returns the current latency of a link * -- 2.20.1