Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'adrien' into 'master'
[simgrid.git] / src / kernel / actor / ActorImpl.cpp
index 4e0162f..0c9d9a5 100644 (file)
@@ -227,7 +227,7 @@ void ActorImpl::exit()
   this->throw_exception(std::make_exception_ptr(ForcefulKillException(host_->is_on() ? "exited" : "host failed")));
 }
 
-void ActorImpl::kill(ActorImpl* actor)
+void ActorImpl::kill(ActorImpl* actor) const
 {
   xbt_assert(actor != simix_global->maestro_, "Killing maestro is a rather bad idea");
   if (actor->finished_) {
@@ -252,7 +252,7 @@ void ActorImpl::kill(ActorImpl* actor)
   }
 }
 
-void ActorImpl::kill_all()
+void ActorImpl::kill_all() const
 {
   for (auto const& kv : simix_global->process_list)
     if (kv.second != this)
@@ -270,7 +270,7 @@ void ActorImpl::set_kill_time(double kill_time)
   });
 }
 
-double ActorImpl::get_kill_time()
+double ActorImpl::get_kill_time() const
 {
   return kill_timer_ ? kill_timer_->get_date() : 0;
 }
@@ -454,7 +454,7 @@ void ActorImpl::set_host(s4u::Host* dest)
   dest->pimpl_->add_actor(this);
 }
 
-ActorImplPtr ActorImpl::init(const std::string& name, s4u::Host* host)
+ActorImplPtr ActorImpl::init(const std::string& name, s4u::Host* host) const
 {
   ActorImpl* actor = new ActorImpl(xbt::string(name), host);
   actor->set_ppid(this->pid_);
@@ -494,7 +494,8 @@ ActorImpl* ActorImpl::start(const ActorCode& code)
 }
 
 ActorImplPtr ActorImpl::create(const std::string& name, const ActorCode& code, void* data, s4u::Host* host,
-                               const std::unordered_map<std::string, std::string>* properties, ActorImpl* parent_actor)
+                               const std::unordered_map<std::string, std::string>* properties,
+                               const ActorImpl* parent_actor)
 {
   XBT_DEBUG("Start actor %s@'%s'", name.c_str(), host->get_cname());