#include "src/surf/surf_interface.hpp"
#include "src/surf/cpu_interface.hpp"
-
#include "simgrid/s4u/Host.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_process);
timeoutDetector->unref();
XBT_DEBUG("Destroy exec %p", this);
}
+
void simgrid::kernel::activity::ExecImpl::suspend()
{
XBT_VERB("This exec is suspended (remain: %f)", surfAction_->getRemains());
return surfAction_ ? surfAction_->getRemains() : 0;
}
+
double simgrid::kernel::activity::ExecImpl::remainingRatio()
{
if (host_ == nullptr) // parallel task: their remain is already between 0 and 1 (see comment in ExecImpl::remains())
return surfAction_->getRemains() / surfAction_->getCost();
}
+void simgrid::kernel::activity::ExecImpl::setBound(double bound)
+{
+ if (surfAction_)
+ surfAction_->setBound(bound);
+}
+
void simgrid::kernel::activity::ExecImpl::post()
{
if (host_ && host_->isOff()) { /* FIXME: handle resource failure for parallel tasks too */
return this;
}
-
/*************
* Callbacks *
*************/