void Host::turnOn()
{
if (isOff()) {
- simgrid::simix::kernelImmediate([this] {
+ simgrid::simix::simcall([this] {
this->extension<simgrid::simix::Host>()->turnOn();
this->pimpl_cpu->turn_on();
onStateChange(*this);
{
if (isOn()) {
smx_actor_t self = SIMIX_process_self();
- simgrid::simix::kernelImmediate([this, self] {
+ simgrid::simix::simcall([this, self] {
SIMIX_host_off(this, self);
onStateChange(*this);
});
/** Get the properties assigned to a host */
std::map<std::string, std::string>* Host::getProperties()
{
- return simgrid::simix::kernelImmediate([this] { return this->pimpl_->getProperties(); });
+ return simgrid::simix::simcall([this] { return this->pimpl_->getProperties(); });
}
/** Retrieve the property value (or nullptr if not set) */
void Host::setProperty(std::string key, std::string value)
{
- simgrid::simix::kernelImmediate([this, key, value] { this->pimpl_->setProperty(key, value); });
+ simgrid::simix::simcall([this, key, value] { this->pimpl_->setProperty(key, value); });
}
/** Get the processes attached to the host */
/** @brief Get the peak processor speed (in flops/s), at the specified pstate */
double Host::getPstateSpeed(int pstate_index)
{
- return simgrid::simix::kernelImmediate(
- [this, pstate_index] { return this->pimpl_cpu->getPstateSpeed(pstate_index); });
+ return simgrid::simix::simcall([this, pstate_index] { return this->pimpl_cpu->getPstateSpeed(pstate_index); });
}
/** @brief Get the peak processor speed (under full load (=1.0), in flops/s), at the current pstate */
/** @brief Set the pstate at which the host should run */
void Host::setPstate(int pstate_index)
{
- simgrid::simix::kernelImmediate([this, pstate_index] { this->pimpl_cpu->setPState(pstate_index); });
+ simgrid::simix::simcall([this, pstate_index] { this->pimpl_cpu->setPState(pstate_index); });
}
/** @brief Retrieve the pstate at which the host is currently running */
int Host::getPstate()
*/
std::vector<const char*> Host::get_attached_storages()
{
- return simgrid::simix::kernelImmediate([this] { return this->pimpl_->get_attached_storages(); });
+ return simgrid::simix::simcall([this] { return this->pimpl_->get_attached_storages(); });
}
void Host::getAttachedStorages(std::vector<const char*>* storages)
{
std::vector<const char*> local_storages =
- simgrid::simix::kernelImmediate([this] { return this->pimpl_->get_attached_storages(); });
+ simgrid::simix::simcall([this] { return this->pimpl_->get_attached_storages(); });
for (auto elm : local_storages)
storages->push_back(elm);
}