- xbt_assert(pimpl_,"Cannot create the actor");
-// TRACE_msg_process_create(procname, simcall_process_get_PID(p_smx_process), host->getInferior());
-// simcall_process_on_exit(p_smx_process,(int_f_pvoid_pvoid_t)TRACE_msg_process_kill,p_smx_process);
+ActorPtr Actor::createActor(const char* name, s4u::Host *host, double killTime,
+ const char* function, std::vector<std::string> args)
+{
+ simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(function);
+ simgrid::simix::ActorCode code = factory(std::move(args));
+ smx_process_t process = simcall_process_create(
+ name, std::move(code), nullptr, host->name().c_str(),
+ killTime, nullptr, 0);
+ return ActorPtr(&process->actor());