Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[S4U] Host: Add 'const' keyword to getter methods
[simgrid.git] / src / msg / msg_process.cpp
index 521170a..12084ff 100644 (file)
@@ -57,7 +57,7 @@ void MSG_process_cleanup_from_SIMIX(smx_actor_t smx_actor)
 }
 
 /* This function creates a MSG process. It has the prototype enforced by SIMIX_function_register_process_create */
-smx_actor_t MSG_process_create_from_SIMIX(const char* name, std::function<void()> code, void* data, sg_host_t host,
+smx_actor_t MSG_process_create_from_SIMIX(const char* name, simgrid::simix::ActorCode code, void* data, sg_host_t host,
                                           std::unordered_map<std::string, std::string>* properties,
                                           smx_actor_t /*parent_process*/)
 {
@@ -127,7 +127,7 @@ msg_process_t MSG_process_create_with_arguments(const char *name, xbt_main_func_
 msg_process_t MSG_process_create_with_environment(const char *name, xbt_main_func_t code, void *data, msg_host_t host,
                                                   int argc, char **argv, xbt_dict_t properties)
 {
-  std::function<void()> function;
+  simgrid::simix::ActorCode function;
   if (code)
     function = simgrid::xbt::wrap_main(code, argc, static_cast<const char* const*>(argv));
 
@@ -146,7 +146,7 @@ msg_process_t MSG_process_create_with_environment(const char *name, xbt_main_fun
   return res;
 }
 
-msg_process_t MSG_process_create_from_stdfunc(const char* name, std::function<void()> code, void* data, msg_host_t host,
+msg_process_t MSG_process_create_from_stdfunc(const char* name, simgrid::simix::ActorCode code, void* data, msg_host_t host,
                                               std::unordered_map<std::string, std::string>* properties)
 {
   xbt_assert(code != nullptr && host != nullptr, "Invalid parameters: host and code params must not be nullptr");