X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/74c05dfe218c074e59069153299e731409a9e83a..578dd56a4a07709db1922ff5edd98f0c8f3090f9:/src/surf/ptask_L07.cpp diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index e875896e66..9a7179fee8 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -26,9 +26,6 @@ void surf_host_model_init_ptask_L07(void) xbt_assert(!surf_cpu_model_pm, "CPU model type already defined"); xbt_assert(!surf_network_model, "network model type already defined"); - // Define the callbacks to parse the XML - simgrid::surf::on_link.connect(netlink_parse_init); - surf_host_model = new simgrid::surf::HostL07Model(); xbt_dynar_push(all_existing_models, &surf_host_model); } @@ -155,8 +152,7 @@ void HostL07Model::updateActionsState(double /*now*/, double delta) { while ((cnst = lmm_get_cnst_from_var(maxminSystem_, action->getVariable(), i++))) { void *constraint_id = lmm_constraint_id(cnst); - - if (static_cast(constraint_id)->isOff()) { + if (static_cast(constraint_id)->isOff()) { XBT_DEBUG("Action (%p) Failed!!", action); action->finish(); action->setState(Action::State::failed); @@ -222,7 +218,7 @@ L07Action::L07Action(Model *model, int host_nb, sg_host_t*host_list, this->m_latency = latency; this->m_rate = rate; - this->p_variable = lmm_variable_new(model->getMaxminSystem(), this, 1.0, + this->variable_ = lmm_variable_new(model->getMaxminSystem(), this, 1.0, (rate > 0 ? rate : -1.0), host_nb + nb_link); @@ -324,8 +320,8 @@ Action *CpuL07::execution_start(double size) Action *CpuL07::sleep(double duration) { L07Action *action = static_cast(execution_start(1.0)); - action->m_maxDuration = duration; - action->m_suspended = 2; + action->maxDuration_ = duration; + action->suspended_ = 2; lmm_update_variable_weight(getModel()->getMaxminSystem(), action->getVariable(), 0.0); return action; @@ -453,7 +449,7 @@ void L07Action::updateBound() } lat_bound = sg_tcp_gamma / (2.0 * lat_current); XBT_DEBUG("action (%p) : lat_bound = %g", this, lat_bound); - if ((m_latency == 0.0) && (m_suspended == 0)) { + if ((m_latency == 0.0) && (suspended_ == 0)) { if (m_rate < 0) lmm_update_variable_bound(getModel()->getMaxminSystem(), getVariable(), lat_bound); else @@ -464,10 +460,10 @@ void L07Action::updateBound() int L07Action::unref() { - m_refcount--; - if (!m_refcount) { + refcount_--; + if (!refcount_) { if (action_hook.is_linked()) - p_stateSet->erase(p_stateSet->iterator_to(*this)); + stateSet_->erase(stateSet_->iterator_to(*this)); if (getVariable()) lmm_variable_free(getModel()->getMaxminSystem(), getVariable()); delete this;