*/
void Host::destroy()
{
- kernel::actor::simcall([this] { this->pimpl_->destroy(); });
+ kernel::actor::simcall_answered([this] { this->pimpl_->destroy(); });
}
Host* Host::by_name(const std::string& name)
void Host::turn_on()
{
if (not is_on()) {
- kernel::actor::simcall([this] {
+ kernel::actor::simcall_answered([this] {
this->pimpl_cpu_->turn_on();
this->pimpl_->turn_on();
on_state_change(*this);
{
if (is_on()) {
const kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
- kernel::actor::simcall([this, self] {
+ kernel::actor::simcall_answered([this, self] {
for (VirtualMachine* const& vm : kernel::resource::VirtualMachineImpl::allVms_)
if (vm->get_pm() == this) {
vm->shutdown();
Host* Host::set_property(const std::string& key, const std::string& value)
{
- kernel::actor::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
+ kernel::actor::simcall_answered([this, &key, &value] { this->pimpl_->set_property(key, value); });
return this;
}
Host* Host::set_properties(const std::unordered_map<std::string, std::string>& properties)
{
- kernel::actor::simcall([this, &properties] { this->pimpl_->set_properties(properties); });
+ kernel::actor::simcall_answered([this, &properties] { this->pimpl_->set_properties(properties); });
return this;
}
* The profile must contain boolean values. */
Host* Host::set_state_profile(kernel::profile::Profile* p)
{
- kernel::actor::simcall([this, p] { pimpl_cpu_->set_state_profile(p); });
+ kernel::actor::simcall_answered([this, p] { pimpl_cpu_->set_state_profile(p); });
return this;
}
/** Specify a profile modeling the external load according to an exhaustive list or a stochastic law.
*/
Host* Host::set_speed_profile(kernel::profile::Profile* p)
{
- kernel::actor::simcall([this, p] { pimpl_cpu_->set_speed_profile(p); });
+ kernel::actor::simcall_answered([this, p] { pimpl_cpu_->set_speed_profile(p); });
return this;
}
Host* Host::set_sharing_policy(SharingPolicy policy, const s4u::NonLinearResourceCb& cb)
{
- kernel::actor::simcall([this, policy, &cb] { pimpl_cpu_->set_sharing_policy(policy, cb); });
+ kernel::actor::simcall_answered([this, policy, &cb] { pimpl_cpu_->set_sharing_policy(policy, cb); });
return this;
}
Host* Host::set_core_count(int core_count)
{
- kernel::actor::simcall([this, core_count] { this->pimpl_cpu_->set_core_count(core_count); });
+ kernel::actor::simcall_answered([this, core_count] { this->pimpl_cpu_->set_core_count(core_count); });
return this;
}
Host* Host::set_pstate_speed(const std::vector<double>& speed_per_state)
{
- kernel::actor::simcall([this, &speed_per_state] { pimpl_cpu_->set_pstate_speed(speed_per_state); });
+ kernel::actor::simcall_answered([this, &speed_per_state] { pimpl_cpu_->set_pstate_speed(speed_per_state); });
return this;
}
/** @brief Set the pstate at which the host should run */
Host* Host::set_pstate(unsigned long pstate_index)
{
- kernel::actor::simcall([this, pstate_index] { this->pimpl_cpu_->set_pstate(pstate_index); });
+ kernel::actor::simcall_answered([this, pstate_index] { this->pimpl_cpu_->set_pstate(pstate_index); });
return this;
}
Host* Host::set_factor_cb(const std::function<CpuFactorCb>& cb)
{
- kernel::actor::simcall([this, &cb] { pimpl_cpu_->set_factor_cb(cb); });
+ kernel::actor::simcall_answered([this, &cb] { pimpl_cpu_->set_factor_cb(cb); });
return this;
}
Host* Host::set_coordinates(const std::string& coords)
{
if (not coords.empty())
- kernel::actor::simcall([this, coords] { this->pimpl_netpoint_->set_coordinates(coords); });
+ kernel::actor::simcall_answered([this, coords] { this->pimpl_netpoint_->set_coordinates(coords); });
return this;
}
std::vector<Disk*> Host::get_disks() const
Disk* Host::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth)
{
- return kernel::actor::simcall([this, &name, read_bandwidth, write_bandwidth] {
+ return kernel::actor::simcall_answered([this, &name, read_bandwidth, write_bandwidth] {
auto* disk = pimpl_->create_disk(name, read_bandwidth, write_bandwidth);
pimpl_->add_disk(disk);
return disk;
void Host::add_disk(const Disk* disk)
{
- kernel::actor::simcall([this, disk] { this->pimpl_->add_disk(disk); });
+ kernel::actor::simcall_answered([this, disk] { this->pimpl_->add_disk(disk); });
}
void Host::remove_disk(const std::string& disk_name)
{
- kernel::actor::simcall([this, disk_name] { this->pimpl_->remove_disk(disk_name); });
+ kernel::actor::simcall_answered([this, disk_name] { this->pimpl_->remove_disk(disk_name); });
}
VirtualMachine* Host::create_vm(const std::string& name, int core_amount)
Host* Host::seal()
{
- kernel::actor::simcall([this]() { this->pimpl_->seal(); });
+ kernel::actor::simcall_answered([this]() { this->pimpl_->seal(); });
simgrid::s4u::Host::on_creation(*this); // notify the signal
return this;
}
}
/** @brief Displays debugging information about a host */
-void sg_host_dump(const_sg_host_t host)
+void sg_host_dump(const_sg_host_t host) // XBT_ATTRIB_DEPRECATED_v335
{
XBT_INFO("Displaying host %s", host->get_cname());
XBT_INFO(" - speed: %.0f", host->get_speed());