X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5e7d79b763a5f55d1afb579d2b5a8d30ccfe869c..cf975a3147956b454a79d81f3557a13ba7800083:/include/simgrid/kernel/resource/Action.hpp?ds=sidebyside diff --git a/include/simgrid/kernel/resource/Action.hpp b/include/simgrid/kernel/resource/Action.hpp index b42d5b4823..f3fa29799d 100644 --- a/include/simgrid/kernel/resource/Action.hpp +++ b/include/simgrid/kernel/resource/Action.hpp @@ -117,6 +117,8 @@ public: * @param delta Amount to remove from the remaining time */ void update_remains(double delta); + virtual void update_remains_lazy(double now) = 0; + /** @brief Set the remaining time of the current action */ void set_remains(double value) { remains_ = value; } @@ -133,7 +135,7 @@ public: /** @brief Unref that action (and destroy it if refcount reaches 0) * @return true if the action was destroyed and false if someone still has references on it */ - virtual int unref(); + int unref(); /** @brief Cancel the current Action if running */ virtual void cancel(); @@ -170,9 +172,9 @@ public: protected: StateSet* state_set_; - int refcount_ = 1; private: + int refcount_ = 1; double sharing_priority_ = 1.0; /**< priority (1.0 by default) */ double max_duration_ = NO_MAX_DURATION; /*< max_duration (may fluctuate until the task is completed) */ double remains_; /**< How much of that cost remains to be done in the currently running task */ @@ -193,7 +195,6 @@ private: boost::optional heap_handle_ = boost::none; public: - virtual void updateRemainingLazy(double now) = 0; void heapInsert(heap_type& heap, double key, Action::Type hat); void heapRemove(heap_type& heap); void heapUpdate(heap_type& heap, double key, Action::Type hat);