Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar
[simgrid.git] / src / msg / msg_process.cpp
index 63236a2..4603d88 100644 (file)
@@ -52,7 +52,7 @@ void MSG_process_cleanup_from_SIMIX(smx_actor_t smx_actor)
 smx_actor_t MSG_process_create_from_SIMIX(const char* name, std::function<void()> code, void* data, sg_host_t host,
                                           xbt_dict_t properties, smx_actor_t parent_process)
 {
-  msg_process_t p = MSG_process_create_with_environment(name, std::move(code), data, host, properties);
+  msg_process_t p = MSG_process_create_from_stdfunc(name, std::move(code), data, host, properties);
   return p;
 }
 
@@ -121,17 +121,15 @@ msg_process_t MSG_process_create_with_environment(const char *name, xbt_main_fun
   std::function<void()> function;
   if (code)
     function = simgrid::xbt::wrapMain(code, argc, const_cast<const char*const*>(argv));
-  msg_process_t res = MSG_process_create_with_environment(name,
-    std::move(function), data, host, properties);
+  msg_process_t res = MSG_process_create_from_stdfunc(name, std::move(function), data, host, properties);
   for (int i = 0; i != argc; ++i)
     xbt_free(argv[i]);
   xbt_free(argv);
   return res;
 }
 
-msg_process_t MSG_process_create_with_environment(
-  const char *name, std::function<void()> code, void *data,
-  msg_host_t host, xbt_dict_t properties)
+msg_process_t MSG_process_create_from_stdfunc(const char* name, std::function<void()> code, void* data, msg_host_t host,
+                                              xbt_dict_t properties)
 {
   xbt_assert(code != nullptr && host != nullptr, "Invalid parameters: host and code params must not be nullptr");
   simgrid::MsgActorExt* msgExt = new simgrid::MsgActorExt(data);