smx_mailbox_t mbox = simcall_mbox_get_by_name(name);
if (mbox == nullptr)
mbox = simcall_mbox_create(name);
- return MailboxPtr(&mbox->mbox_, true);
+ return MailboxPtr(&mbox->piface_, true);
}
bool Mailbox::empty() {
surf_action_t action;
xbt_dynar_foreach(all_existing_models, iter, model) {
- XBT_DEBUG("Handling process whose action failed");
+ XBT_DEBUG("Handling the processes whose action failed (if any)");
while ((action = surf_model_extract_failed_action_set(model))) {
XBT_DEBUG(" Handling Action %p",action);
SIMIX_simcall_exit((smx_synchro_t) action->getData());
}
- XBT_DEBUG("Handling process whose action terminated normally");
+ XBT_DEBUG("Handling the processes whose action terminated normally (if any)");
while ((action = surf_model_extract_done_action_set(model))) {
XBT_DEBUG(" Handling Action %p",action);
if (action->getData() == nullptr)
class Mailbox {
public:
- Mailbox(const char* name) : mbox_(this), name(xbt_strdup(name)) {}
+ Mailbox(const char* name) : piface_(this), name(xbt_strdup(name)) {}
~Mailbox() {
xbt_free(name);
}
- simgrid::s4u::Mailbox mbox_;
+ simgrid::s4u::Mailbox piface_; // Our interface
char* name;
std::deque<smx_synchro_t> comm_queue;
boost::intrusive_ptr<simgrid::simix::Process> permanent_receiver; //process which the mailbox is attached to
void HostImpl::attach(simgrid::s4u::Host* host)
{
- if (p_host != nullptr)
+ if (piface != nullptr)
xbt_die("Already attached to host %s", host->name().c_str());
host->extension_set(this);
- p_host = host;
+ piface = host;
}
bool HostImpl::isOn() const {
void HostImpl::turnOn(){
if (isOff()) {
p_cpu->turnOn();
- simgrid::s4u::Host::onStateChange(*this->p_host);
+ simgrid::s4u::Host::onStateChange(*this->piface);
}
}
void HostImpl::turnOff(){
if (isOn()) {
p_cpu->turnOff();
- simgrid::s4u::Host::onStateChange(*this->p_host);
+ simgrid::s4u::Host::onStateChange(*this->piface);
}
}
public:
xbt_dynar_t p_storage;
Cpu *p_cpu;
- simgrid::s4u::Host* p_host = nullptr;
+ simgrid::s4u::Host* piface = nullptr;
/** @brief Get the list of virtual machines on the current Host */
xbt_dynar_t getVms();
void getParams(vm_params_t params);
/** @brief Sets the params of that VM/PM */
void setParams(vm_params_t params);
- simgrid::s4u::Host* getHost() { return p_host; }
+ simgrid::s4u::Host* getHost() { return piface; }
private:
s_vm_params_t p_params;
};
if (vm) // If it's a VM, take the corresponding PM
host = vm->getPm()->extension<simgrid::surf::HostImpl>();
- HostEnergy *host_energy = host->p_host->extension<HostEnergy>();
+ HostEnergy *host_energy = host->piface->extension<HostEnergy>();
if(host_energy->last_updated < surf_get_clock())
host_energy->update();