X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/96cedde3cdbc0b8ffc3f096a1b65d021b0226f99..e47e02e59a4fb6c51d6b7d9cc8a3732cc73dc0ae:/src/simix/ActorImpl.cpp diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index a89e3c29b2..9f72900aa3 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -23,7 +23,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix, "Logging specific to SIMIX (process)"); -unsigned long simix_process_maxpid = 0; +static unsigned long simix_process_maxpid = 0; /** * @brief Returns the current agent. @@ -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); } @@ -369,9 +367,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; } @@ -472,8 +469,8 @@ void SIMIX_process_kill(smx_actor_t actor, smx_actor_t issuer) return; } - XBT_DEBUG("Actor '%s'@%s is killing actor '%s'@%s", issuer->get_cname(), - (issuer->host_ == nullptr ? "(null)" : issuer->host_->get_cname()), actor->get_cname(), + XBT_DEBUG("Actor '%s'@%s is killing actor '%s'@%s", issuer == nullptr ? "(null)" : issuer->get_cname(), + (issuer == nullptr || issuer->host_ == nullptr ? "(null)" : issuer->host_->get_cname()), actor->get_cname(), actor->host_->get_cname()); actor->context_->iwannadie = true;