namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace actor {
ActorImpl::~ActorImpl()
{
// retrieve the arguments of the old process
// FIXME: Factorize this with SIMIX_host_add_auto_restart_process ?
- simgrid::simix::ProcessArg arg;
+ simgrid::kernel::actor::ProcessArg arg;
arg.name = name;
arg.code = code;
arg.host = host;
simgrid::kernel::activity::SleepImpl* synchro = new simgrid::kernel::activity::SleepImpl();
synchro->host = host;
synchro->surf_sleep = host->pimpl_cpu->sleep(duration);
- synchro->surf_sleep->setData(synchro);
+ synchro->surf_sleep->set_data(synchro);
XBT_DEBUG("Create sleep synchronization %p", synchro);
return synchro;
{
smx_actor_t maestro = nullptr;
/* Create maestro process and initialize it */
- maestro = new simgrid::simix::ActorImpl();
+ maestro = new simgrid::kernel::actor::ActorImpl();
maestro->pid = simix_process_maxpid++;
maestro->name = "";
maestro->userdata = nullptr;
simix_global->maestro_process = maestro;
}
+} // namespace actor
}
}
/** @brief Creates and runs the maestro process */
void SIMIX_maestro_create(void (*code)(void*), void* data)
{
- simgrid::simix::create_maestro(std::bind(code, data));
+ simgrid::kernel::actor::create_maestro(std::bind(code, data));
}
/**
return nullptr;
}
- smx_actor_t process = new simgrid::simix::ActorImpl();
+ smx_actor_t process = new simgrid::kernel::actor::ActorImpl();
xbt_assert(code && host != nullptr, "Invalid parameters");
/* Process data */
simix_global->process_to_run.push_back(process);
intrusive_ptr_add_ref(process);
/* Tracing the process creation */
- TRACE_msg_process_create(process->ciface(), process->host);
-
+ if (TRACE_actor_is_enabled())
+ simgrid::instr::Container::byName(process->host->getName())->createChild(instr_pid(process->ciface()), "ACTOR");
/* 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::onCreation(tmp);
return nullptr;
}
- smx_actor_t process = new simgrid::simix::ActorImpl();
+ smx_actor_t process = new simgrid::kernel::actor::ActorImpl();
/* Process data */
process->pid = simix_process_maxpid++;
process->name = std::string(name);
intrusive_ptr_add_ref(process);
/* Tracing the process creation */
- TRACE_msg_process_create(process->ciface(), process->host);
+ if (TRACE_actor_is_enabled())
+ simgrid::instr::Container::byName(process->host->getName())->createChild(instr_pid(process->ciface()), "ACTOR");
auto* context = dynamic_cast<simgrid::kernel::context::AttachContext*>(process->context);
if (not context)