Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill an unused function
[simgrid.git] / src / simix / ActorImpl.cpp
index 73c1c7e..37547d7 100644 (file)
@@ -36,7 +36,7 @@ smx_actor_t SIMIX_process_self()
 {
   smx_context_t self_context = simgrid::kernel::context::Context::self();
 
-  return (self_context != nullptr) ? self_context->process() : nullptr;
+  return (self_context != nullptr) ? self_context->get_actor() : nullptr;
 }
 
 /**
@@ -301,8 +301,6 @@ void create_maestro(simgrid::simix::ActorCode code)
   if (not code) {
     maestro->context_ = SIMIX_context_new(simgrid::simix::ActorCode(), nullptr, maestro);
   } else {
-    if (not simix_global)
-      xbt_die("simix is not initialized, please call MSG_init first");
     maestro->context_ = simix_global->context_factory->create_maestro(code, maestro);
   }
 
@@ -314,12 +312,6 @@ void create_maestro(simgrid::simix::ActorCode code)
 }
 }
 
-/** @brief Creates and runs the maestro process */
-void SIMIX_maestro_create(void (*code)(void*), void* data)
-{
-  simgrid::kernel::actor::create_maestro(std::bind(code, data));
-}
-
 /**
  * @brief Internal function to create a process.
  *
@@ -369,9 +361,8 @@ smx_actor_t SIMIX_process_create(std::string name, simgrid::simix::ActorCode cod
   simix_global->process_to_run.push_back(process);
   intrusive_ptr_add_ref(process);
 
-  /* The onCreation() signal must be delayed until there, where the pid and everything is set */
-  simgrid::s4u::ActorPtr tmp = process->iface(); // Passing this directly to onCreation will lead to crashes
-  simgrid::s4u::Actor::on_creation(tmp);
+  /* The on_creation() signal must be delayed until there, where the pid and everything is set */
+  simgrid::s4u::Actor::on_creation(process->iface());
 
   return process;
 }
@@ -433,7 +424,7 @@ void SIMIX_process_detach()
   if (context == nullptr)
     xbt_die("Not a suitable context");
 
-  SIMIX_process_cleanup(context->process());
+  SIMIX_process_cleanup(context->get_actor());
   context->attach_stop();
 }