X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ad0262690dd5803f9dd716e4278bbb485083138f..4f6578bb22ea8413ac5e5cc6fe902ab2c925c577:/src/surf/surf_interface.hpp diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index f243cac497..b9f27ee289 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2014. The SimGrid Team. +/* Copyright (c) 2004-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -49,10 +49,6 @@ extern double sg_latency_factor; extern double sg_bandwidth_factor; extern double sg_weight_S_parameter; extern int sg_network_crosstraffic; -#ifdef HAVE_GTNETS -extern double sg_gtnets_jitter; -extern int sg_gtnets_jitter_seed; -#endif extern xbt_dynar_t surf_path; extern "C" { @@ -107,27 +103,13 @@ XBT_PUBLIC_DATA(xbt_dynar_t) model_list; */ XBT_PUBLIC_CLASS Model { public: - /** - * @brief Model constructor - * - * @param name the name of the model - */ - Model(const char *name); - - /** - * @brief Model destructor - */ + /** @brief Constructor */ + Model(); + /** @brief Destructor */ virtual ~Model(); virtual void addTraces() =0; - /** - * @brief Get the name of the current Model - * - * @return The name of the current Model - */ - const char *getName() {return p_name;} - /** * @brief Get the set of [actions](@ref Action) in *ready* state * @@ -211,16 +193,21 @@ public: virtual void updateActionsStateLazy(double now, double delta); virtual void updateActionsStateFull(double now, double delta); + /** @brief Returns whether this model have an idempotent shareResource() + * + * The only model that is not is NS3: computing the next timestamp moves the model up to that point, + * so we need to call it only when the next timestamp of other sources is computed. + */ + virtual bool shareResourcesIsIdempotent()=0; + protected: ActionLmmListPtr p_modifiedSet; lmm_system_t p_maxminSystem; - e_UM_t p_updateMechanism; + e_UM_t p_updateMechanism = UM_UNDEFINED; int m_selectiveUpdate; xbt_heap_t p_actionHeap; private: - const char *p_name; - ActionListPtr p_readyActionSet; /**< Actions in state SURF_ACTION_READY */ ActionListPtr p_runningActionSet; /**< Actions in state SURF_ACTION_RUNNING */ ActionListPtr p_failedActionSet; /**< Actions in state SURF_ACTION_FAILED */ @@ -467,9 +454,6 @@ public: /** @brief Cancel the current Action if running */ virtual void cancel(); - /** @brief Recycle an Action */ - virtual void recycle(){}; - /** @brief Suspend the current Action */ virtual void suspend(); @@ -494,11 +478,7 @@ public: /** @brief Set the priority of the current Action */ virtual void setPriority(double priority); - /** - * @brief Get the state set in which the action is - * - * @return The state set in which the action is - */ + /** @brief Get the state set in which the action is */ ActionListPtr getStateSet() {return p_stateSet;}; s_xbt_swag_hookup_t p_stateHookup; @@ -514,7 +494,6 @@ protected: double m_finish; /**< finish time : this is modified during the run and fluctuates until the task is completed */ private: - bool m_failed; double m_start; /**< start time */ char *p_category; /**< tracing category for categorized resource utilization monitoring */