Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new functions: Link::is_{on,off}()
[simgrid.git] / src / surf / sg_platf.cpp
index b5d0b2d614a00745701a811d81bdc4548b5793f2..bc82d2dd23c07b177ca26e8f9326895f0f56bcf5 100644 (file)
@@ -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});
 }