Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics.
[simgrid.git] / src / kernel / actor / ActorImpl.cpp
index 0c9d9a5..935fa6d 100644 (file)
@@ -62,7 +62,7 @@ ActorImpl::ActorImpl(xbt::string name, s4u::Host* host) : host_(host), name_(std
 ActorImpl::~ActorImpl()
 {
   if (simix_global != nullptr && this != simix_global->maestro_)
-    s4u::Actor::on_destruction(*ciface());
+    s4u::Actor::on_destruction(*get_ciface());
 }
 
 /* Become an actor in the simulation
@@ -85,7 +85,7 @@ ActorImplPtr ActorImpl::attach(const std::string& name, void* data, s4u::Host* h
     throw HostFailureException(XBT_THROW_POINT, "Cannot attach actor on failed host.");
   }
 
-  ActorImpl* actor = new ActorImpl(xbt::string(name), host);
+  auto* actor = new ActorImpl(xbt::string(name), host);
   /* Actor data */
   actor->set_user_data(data);
   actor->code_ = nullptr;
@@ -112,7 +112,7 @@ ActorImplPtr ActorImpl::attach(const std::string& name, void* data, s4u::Host* h
   context->attach_start();
 
   /* The on_creation() signal must be delayed until there, where the pid and everything is set */
-  s4u::Actor::on_creation(*actor->ciface());
+  s4u::Actor::on_creation(*actor->get_ciface());
 
   return ActorImplPtr(actor);
 }
@@ -190,7 +190,7 @@ void ActorImpl::cleanup()
   cleanup_from_simix();
 
   context_->set_wannadie(false); // don't let the simcall's yield() do a Context::stop(), to avoid infinite loops
-  actor::simcall([this] { s4u::Actor::on_termination(*ciface()); });
+  actor::simcall([this] { s4u::Actor::on_termination(*get_ciface()); });
   context_->set_wannadie();
 }
 
@@ -310,7 +310,7 @@ void ActorImpl::yield()
   }
 
   if (SMPI_switch_data_segment && not finished_) {
-    SMPI_switch_data_segment(iface());
+    SMPI_switch_data_segment(get_iface());
   }
 }
 
@@ -356,7 +356,7 @@ s4u::Actor* ActorImpl::restart()
   actor->set_kill_time(arg.kill_time);
   actor->set_auto_restart(arg.auto_restart);
 
-  return actor->ciface();
+  return actor->get_ciface();
 }
 
 void ActorImpl::suspend()
@@ -456,12 +456,12 @@ void ActorImpl::set_host(s4u::Host* dest)
 
 ActorImplPtr ActorImpl::init(const std::string& name, s4u::Host* host) const
 {
-  ActorImpl* actor = new ActorImpl(xbt::string(name), host);
+  auto* actor = new ActorImpl(xbt::string(name), host);
   actor->set_ppid(this->pid_);
 
   intrusive_ptr_add_ref(actor);
   /* The on_creation() signal must be delayed until there, where the pid and everything is set */
-  s4u::Actor::on_creation(*actor->ciface());
+  s4u::Actor::on_creation(*actor->get_ciface());
 
   return ActorImplPtr(actor);
 }
@@ -520,7 +520,7 @@ ActorImplPtr ActorImpl::create(const std::string& name, const ActorCode& code, v
 void create_maestro(const std::function<void()>& code)
 {
   /* Create maestro actor and initialize it */
-  ActorImpl* maestro = new ActorImpl(xbt::string(""), /*host*/ nullptr);
+  auto* maestro = new ActorImpl(xbt::string(""), /*host*/ nullptr);
 
   if (not code) {
     maestro->context_.reset(simix_global->context_factory->create_context(ActorCode(), maestro));
@@ -541,8 +541,7 @@ int SIMIX_process_count() // XBT_ATTRIB_DEPRECATED_v329
   return simix_global->process_list.size();
 }
 
-// XBT_DEPRECATED_v329
-void* SIMIX_process_self_get_data()
+void* SIMIX_process_self_get_data() // XBT_ATTRIB_DEPRECATED_v329
 {
   smx_actor_t self = simgrid::kernel::actor::ActorImpl::self();
 
@@ -552,8 +551,7 @@ void* SIMIX_process_self_get_data()
   return self->get_user_data();
 }
 
-// XBT_DEPRECATED_v329
-void SIMIX_process_self_set_data(void* data)
+void SIMIX_process_self_set_data(void* data) // XBT_ATTRIB_DEPRECATED_v329
 {
   simgrid::kernel::actor::ActorImpl::self()->set_user_data(data);
 }