#include "storage_n11.hpp"
#include "simgrid/s4u/Engine.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
#include "src/kernel/routing/NetPoint.hpp"
-#include "surf/maxmin.hpp"
+#include "xbt/utility.hpp"
#include <cmath> /*ceil*/
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage);
refcount_--;
if (not refcount_) {
if (action_hook.is_linked())
- stateSet_->erase(stateSet_->iterator_to(*this));
+ simgrid::xbt::intrusive_erase(*stateSet_, *this);
if (getVariable())
getModel()->getMaxminSystem()->variable_free(getVariable());
xbt_free(getCategory());
void StorageN11Action::suspend()
{
XBT_IN("(%p)", this);
- if (suspended_ != 2) {
+ if (suspended_ != Action::SuspendStates::sleeping) {
getModel()->getMaxminSystem()->update_variable_weight(getVariable(), 0.0);
- suspended_ = 1;
+ suspended_ = Action::SuspendStates::suspended;
}
XBT_OUT();
}
bool StorageN11Action::isSuspended()
{
- return suspended_ == 1;
+ return suspended_ == Action::SuspendStates::suspended;
}
void StorageN11Action::setMaxDuration(double /*duration*/)