X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0ab507a3a46a0b5b6c8920f02d088eafb24c6033..45a1ba5b81958f1dc2d23bc6ad4dccbdeeaf64fe:/src/s4u/s4u_Host.cpp diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index 0453276114..f86b99071f 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -282,6 +282,19 @@ int Host::get_pstate() const return this->pimpl_cpu->get_pstate(); } +std::vector Host::get_disks() const +{ + return kernel::actor::simcall([this] { return this->pimpl_->get_disks(); }); +} + +void Host::add_disk(Disk* disk) +{ + kernel::actor::simcall([this, disk] { this->pimpl_->add_disk(disk); }); +} +void Host::remove_disk(std::string disk_name) +{ + kernel::actor::simcall([this, disk_name] { this->pimpl_->remove_disk(disk_name); }); +} /** * @ingroup simix_storage_management * @brief Returns the list of storages attached to a host. @@ -385,11 +398,11 @@ xbt_dynar_t sg_hosts_as_dynar() // ========= Layering madness ==============* // ========== User data Layer ========== -void* sg_host_get_data(sg_host_t host) +void* sg_host_data(sg_host_t host) { return host->get_data(); } -void sg_host_set_data(sg_host_t host, void* userdata) +void sg_host_data_set(sg_host_t host, void* userdata) { host->set_data(userdata); }