Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add some const qualifier, needed for later changes.
[simgrid.git] / src / s4u / s4u_Actor.cpp
index 836de05..7f2a401 100644 (file)
@@ -33,7 +33,7 @@ xbt::signal<void(ActorPtr)> s4u::Actor::on_destruction;
 // ***** Actor creation *****
 ActorPtr Actor::self()
 {
-  smx_context_t self_context = kernel::context::Context::self();
+  kernel::context::Context* self_context = kernel::context::Context::self();
   if (self_context == nullptr)
     return ActorPtr();
 
@@ -113,7 +113,7 @@ void Actor::on_exit(const std::function<void(int, void*)>& fun, void* data) /* d
   on_exit([fun, data](bool exit) { fun(exit, data); });
 }
 
-void Actor::on_exit(const std::function<void(bool /*failed*/)>& fun)
+void Actor::on_exit(const std::function<void(bool /*failed*/)>& fun) const
 {
   simix::simcall(
       [this, fun] { SIMIX_process_on_exit(pimpl_, [fun](int a, void* /*data*/) { fun(a != 0); }, nullptr); });
@@ -138,7 +138,7 @@ void Actor::migrate(Host* new_host)
   s4u::Actor::on_migration_end(this);
 }
 
-s4u::Host* Actor::get_host()
+s4u::Host* Actor::get_host() const
 {
   return this->pimpl_->get_host();
 }
@@ -223,11 +223,6 @@ void Actor::kill()
   });
 }
 
-kernel::actor::ActorImpl* Actor::get_impl()
-{
-  return pimpl_;
-}
-
 // ***** Static functions *****
 
 ActorPtr Actor::by_pid(aid_t pid)