X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bfa4e95e4538099a54c5afedd403264c8d99adb6..5b7d9f3be01ce39f56e8fdfb2486e2481d1003a4:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index b5d0b2d614..bc82d2dd23 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -452,10 +452,10 @@ void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor) XBT_DEBUG("Process %s@%s will be started at time %f", arg->name.c_str(), arg->host->get_cname(), start_time); SIMIX_timer_set(start_time, [arg, auto_restart]() { - smx_actor_t actor = SIMIX_process_create(arg->name.c_str(), std::move(arg->code), arg->data, arg->host, - arg->properties.get(), nullptr); + simgrid::kernel::actor::ActorImplPtr actor = simgrid::kernel::actor::ActorImpl::create( + arg->name.c_str(), std::move(arg->code), arg->data, arg->host, arg->properties.get(), nullptr); if (arg->kill_time >= 0) - simcall_process_set_kill_time(actor, arg->kill_time); + actor->set_kill_time(arg->kill_time); if (auto_restart) actor->set_auto_restart(auto_restart); delete arg; @@ -463,13 +463,13 @@ void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor) } else { // start_time <= SIMIX_get_clock() XBT_DEBUG("Starting Process %s(%s) right now", arg->name.c_str(), host->get_cname()); - smx_actor_t actor = - SIMIX_process_create(arg->name.c_str(), std::move(code), nullptr, host, arg->properties.get(), nullptr); + simgrid::kernel::actor::ActorImplPtr actor = simgrid::kernel::actor::ActorImpl::create( + arg->name.c_str(), std::move(code), nullptr, host, arg->properties.get(), nullptr); /* The actor creation will fail if the host is currently dead, but that's fine */ if (actor != nullptr) { if (arg->kill_time >= 0) - simcall_process_set_kill_time(actor, arg->kill_time); + actor->set_kill_time(arg->kill_time); if (auto_restart) actor->set_auto_restart(auto_restart); } @@ -660,11 +660,11 @@ void sg_platf_new_trace(simgrid::kernel::routing::ProfileCreationArgs* profile) { simgrid::kernel::profile::Profile* mgr_profile; if (not profile->file.empty()) { - mgr_profile = tmgr_trace_new_from_file(profile->file); + mgr_profile = simgrid::kernel::profile::Profile::from_file(profile->file); } else { xbt_assert(not profile->pc_data.empty(), "Trace '%s' must have either a content, or point to a file on disk.", profile->id.c_str()); - mgr_profile = tmgr_trace_new_from_string(profile->id, profile->pc_data, profile->periodicity); + mgr_profile = simgrid::kernel::profile::Profile::from_string(profile->id, profile->pc_data, profile->periodicity); } traces_set_list.insert({profile->id, mgr_profile}); }