From: Martin Quinson Date: Mon, 26 Mar 2018 06:57:28 +0000 (+0200) Subject: snake_case another method X-Git-Tag: v3.20~627^2~5 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cf975a3147956b454a79d81f3557a13ba7800083?ds=sidebyside;hp=010f71b687b464c4765b980251300bb6007ae3a6 snake_case another method --- diff --git a/include/simgrid/kernel/resource/Action.hpp b/include/simgrid/kernel/resource/Action.hpp index 20e877ca76..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; } @@ -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); diff --git a/src/kernel/resource/Action.cpp b/src/kernel/resource/Action.cpp index bac3a43661..a0ad4e1dc1 100644 --- a/src/kernel/resource/Action.cpp +++ b/src/kernel/resource/Action.cpp @@ -164,7 +164,7 @@ void Action::suspend() if (get_model()->getUpdateMechanism() == UM_LAZY && state_set_ == get_model()->getRunningActionSet() && sharing_priority_ > 0) { // If we have a lazy model, we need to update the remaining value accordingly - updateRemainingLazy(surf_get_clock()); + update_remains_lazy(surf_get_clock()); } } suspended_ = SuspendStates::suspended; @@ -225,7 +225,7 @@ double Action::get_remains() XBT_IN("(%p)", this); /* update remains before return it */ if (get_model()->getUpdateMechanism() == UM_LAZY) /* update remains before return it */ - updateRemainingLazy(surf_get_clock()); + update_remains_lazy(surf_get_clock()); XBT_OUT(); return remains_; } diff --git a/src/kernel/resource/Model.cpp b/src/kernel/resource/Model.cpp index 77560d6f00..a09aeb6ef0 100644 --- a/src/kernel/resource/Model.cpp +++ b/src/kernel/resource/Model.cpp @@ -65,7 +65,7 @@ double Model::nextOccuringEventLazy(double now) if (action->get_priority() <= 0 || action->getType() == Action::Type::LATENCY) continue; - action->updateRemainingLazy(now); + action->update_remains_lazy(now); double min = -1; double share = action->getVariable()->get_value(); diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index d854732c1b..fe032014ef 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -173,7 +173,7 @@ void Cpu::setSpeedTrace(tmgr_trace_t trace) * Action * **********/ -void CpuAction::updateRemainingLazy(double now) +void CpuAction::update_remains_lazy(double now) { xbt_assert(get_state_set() == get_model()->getRunningActionSet(), "You're updating an action that is not running."); xbt_assert(get_priority() > 0, "You're updating an action that seems suspended."); diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index c642170664..8b66b85f68 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -163,7 +163,7 @@ public: void set_state(simgrid::kernel::resource::Action::State state) override; - void updateRemainingLazy(double now) override; + void update_remains_lazy(double now) override; std::list cpus(); void suspend() override; diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index b5af233fa6..c458d31777 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -462,7 +462,7 @@ void NetworkCm02Link::setLatency(double value) * Action * **********/ -void NetworkCm02Action::updateRemainingLazy(double now) +void NetworkCm02Action::update_remains_lazy(double now) { if (suspended_ != Action::SuspendStates::not_suspended) return; diff --git a/src/surf/network_cm02.hpp b/src/surf/network_cm02.hpp index f9904fd58d..aa76ddf94b 100644 --- a/src/surf/network_cm02.hpp +++ b/src/surf/network_cm02.hpp @@ -69,7 +69,7 @@ class NetworkCm02Action : public NetworkAction { public: NetworkCm02Action(kernel::resource::Model* model, double cost, bool failed) : NetworkAction(model, cost, failed){}; virtual ~NetworkCm02Action() = default; - void updateRemainingLazy(double now) override; + void update_remains_lazy(double now) override; }; } } diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 9a582d7a6f..9424f5956e 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -84,7 +84,7 @@ NetworkConstantAction::NetworkConstantAction(NetworkConstantModel* model_, doubl NetworkConstantAction::~NetworkConstantAction() = default; -void NetworkConstantAction::updateRemainingLazy(double /*now*/) +void NetworkConstantAction::update_remains_lazy(double /*now*/) { THROW_IMPOSSIBLE; } diff --git a/src/surf/network_constant.hpp b/src/surf/network_constant.hpp index 198dd8ac4e..0336b1e6f9 100644 --- a/src/surf/network_constant.hpp +++ b/src/surf/network_constant.hpp @@ -42,7 +42,7 @@ namespace simgrid { NetworkConstantAction(NetworkConstantModel *model_, double size, double latency); ~NetworkConstantAction(); double initialLatency_; - void updateRemainingLazy(double now) override; + void update_remains_lazy(double now) override; }; } diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 3821b8a361..b041a1387b 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -339,7 +339,7 @@ std::list NetworkNS3Action::links() { THROW_UNIMPLEMENTED; } -void NetworkNS3Action::updateRemainingLazy(double /*now*/) +void NetworkNS3Action::update_remains_lazy(double /*now*/) { THROW_IMPOSSIBLE; } diff --git a/src/surf/network_ns3.hpp b/src/surf/network_ns3.hpp index dbf99ea794..15d4f5fccd 100644 --- a/src/surf/network_ns3.hpp +++ b/src/surf/network_ns3.hpp @@ -51,7 +51,7 @@ public: void suspend() override; void resume() override; std::list links() override; - void updateRemainingLazy(double now) override; + void update_remains_lazy(double now) override; // private: double lastSent_ = 0; diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index 47234a01f8..5fb3125cfe 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -173,7 +173,7 @@ void StorageN11Action::set_priority(double /*priority*/) { THROW_UNIMPLEMENTED; } -void StorageN11Action::updateRemainingLazy(double /*now*/) +void StorageN11Action::update_remains_lazy(double /*now*/) { THROW_IMPOSSIBLE; } diff --git a/src/surf/storage_n11.hpp b/src/surf/storage_n11.hpp index 1e4d3426ab..0570669fd6 100644 --- a/src/surf/storage_n11.hpp +++ b/src/surf/storage_n11.hpp @@ -60,7 +60,7 @@ public: bool isSuspended() override; void set_max_duration(double duration) override; void set_priority(double priority) override; - void updateRemainingLazy(double now) override; + void update_remains_lazy(double now) override; }; }