if (property_automaton == nullptr)
property_automaton = xbt_automaton_new();
- RemoteSimulation* process = &this->get_remote_simulation();
+ const RemoteSimulation* process = &this->get_remote_simulation();
RemotePtr<int> address = remote((int*)message.data);
xbt::add_proposition(property_automaton, message.name, [process, address]() { return process->read(address); });
ActorPtr Actor::init(const std::string& name, s4u::Host* host)
{
- kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
+ const kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
kernel::actor::ActorImpl* actor =
kernel::actor::simcall([self, &name, host] { return self->init(name, host).get(); });
return actor->get_iface();
ActorPtr Actor::create(const std::string& name, s4u::Host* host, const std::function<void()>& code)
{
- kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
+ const kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
kernel::actor::ActorImpl* actor =
kernel::actor::simcall([self, &name, host, &code] { return self->init(name, host)->start(code); });
void Actor::join(double timeout)
{
kernel::actor::ActorImpl* issuer = kernel::actor::ActorImpl::self();
- kernel::actor::ActorImpl* target = pimpl_;
+ const kernel::actor::ActorImpl* target = pimpl_;
kernel::actor::simcall_blocking<void>([issuer, target, timeout] {
if (target->finished_) {
// The joined process is already finished, just wake up the issuer right away
void Actor::kill()
{
- kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
+ const kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
kernel::actor::simcall([this, self] { self->kill(pimpl_); });
}
void Actor::kill_all()
{
- kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
+ const kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
kernel::actor::simcall([self] { self->kill_all(); });
}
void Host::turn_off()
{
if (is_on()) {
- kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
+ const kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
kernel::actor::simcall([this, self] {
for (VirtualMachine* const& vm : vm::VirtualMachineImpl::allVms_)
if (vm->get_pm() == this) {