other_comm->clean_fun = clean_fun;
} else {
other_comm->clean_fun = nullptr;
- src_proc->comms.push_back(other_comm);
+ src_proc->activities.push_back(other_comm);
}
/* Setup the communication synchro */
other_comm->state_ = simgrid::kernel::activity::State::READY;
other_comm->set_type(simgrid::kernel::activity::CommImpl::Type::READY);
}
- receiver->comms.push_back(other_comm);
+ receiver->activities.push_back(other_comm);
}
/* Setup communication synchro */
}
simcall->issuer_->waiting_synchro = nullptr;
- simcall->issuer_->comms.remove(this);
+ simcall->issuer_->activities.remove(this);
if (detached_) {
if (simcall->issuer_ == src_actor_) {
if (dst_actor_)
- dst_actor_->comms.remove(this);
+ dst_actor_->activities.remove(this);
} else if (simcall->issuer_ == dst_actor_) {
if (src_actor_)
- src_actor_->comms.remove(this);
+ src_actor_->activities.remove(this);
} else {
- dst_actor_->comms.remove(this);
- src_actor_->comms.remove(this);
+ dst_actor_->activities.remove(this);
+ src_actor_->activities.remove(this);
}
}
}
undaemonize();
/* cancel non-blocking activities */
- for (auto activity : comms)
- boost::static_pointer_cast<activity::CommImpl>(activity)->cancel();
- comms.clear();
+ for (auto activity : activities)
+ activity->cancel();
+ activities.clear();
XBT_DEBUG("%s@%s(%ld) should not run anymore", get_cname(), get_host()->get_cname(), get_pid());
if (exec != nullptr) {
exec->clean_action();
} else if (comm != nullptr) {
- comms.remove(waiting_synchro);
// Remove first occurrence of &actor->simcall:
auto i = boost::range::find(waiting_synchro->simcalls_, &simcall);
if (i != waiting_synchro->simcalls_.end())
activity::ActivityImplPtr(waiting_synchro)->finish();
}
+ activities.remove(waiting_synchro);
waiting_synchro = nullptr;
}
/* cancel the blocking synchro if any */
if (waiting_synchro) {
waiting_synchro->cancel();
-
- activity::CommImplPtr comm = boost::dynamic_pointer_cast<activity::CommImpl>(waiting_synchro);
-
- if (comm != nullptr)
- comms.remove(comm);
-
+ activities.remove(waiting_synchro);
waiting_synchro = nullptr;
}
}
bool suspended_ = false;
activity::ActivityImplPtr waiting_synchro = nullptr; /* the current blocking synchro if any */
- std::list<activity::ActivityImplPtr> comms; /* the current non-blocking communication synchros */
+ std::list<activity::ActivityImplPtr> activities; /* the current non-blocking synchros */
s_smx_simcall simcall;
/* list of functions executed when the process dies */
std::shared_ptr<std::vector<std::function<void(bool)>>> on_exit =