Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simcall_mutex_unlock is back but keep the simplification of another
[simgrid.git] / src / simix / smx_host.cpp
index 18e9829..3fb82a4 100644 (file)
@@ -29,17 +29,13 @@ namespace simgrid {
     {
       /* Clean Simulator data */
       if (xbt_swag_size(process_list) != 0) {
-        char *msg = xbt_strdup("Shutting down host, but it's not empty:");
-        char *tmp;
+        std::string msg     = std::string("Shutting down host, but it's not empty:");
         smx_actor_t process = nullptr;
 
-        xbt_swag_foreach(process, process_list) {
-          tmp = bprintf("%s\n\t%s", msg, process->name.c_str());
-          free(msg);
-          msg = tmp;
-        }
+        xbt_swag_foreach(process, process_list) msg = msg + "\n\t" + process->name.c_str();
+
         SIMIX_display_process_status();
-        THROWF(arg_error, 0, "%s", msg);
+        THROWF(arg_error, 0, "%s", msg.c_str());
       }
       for (auto arg : auto_restart_processes)
         delete arg;
@@ -63,7 +59,7 @@ namespace simgrid {
         if (arg->kill_time >= 0)
           simcall_process_set_kill_time(actor, arg->kill_time);
         if (arg->auto_restart)
-          simcall_process_auto_restart_set(actor, arg->auto_restart);
+          actor->auto_restart = arg->auto_restart;
       }
     }
 
@@ -147,7 +143,7 @@ void SIMIX_host_autorestart(sg_host_t host)
     if (arg->kill_time >= 0)
       simcall_process_set_kill_time(actor, arg->kill_time);
     if (arg->auto_restart)
-      simcall_process_auto_restart_set(actor, arg->auto_restart);
+      actor->auto_restart = arg->auto_restart;
   }
   process_list.clear();
 }
@@ -186,7 +182,7 @@ SIMIX_execution_start(smx_actor_t issuer, const char* name, double flops_amount,
 
 boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
 SIMIX_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
-                               double* bytes_amount, double amount, double rate, double timeout)
+                               double* bytes_amount, double rate, double timeout)
 {
 
   /* alloc structures and initialize */