}
/* 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*/)
{
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::wrapMain(code, argc, static_cast<const char* const*>(argv));
+ function = simgrid::xbt::wrap_main(code, argc, static_cast<const char* const*>(argv));
std::unordered_map<std::string, std::string> props;
xbt_dict_cursor_t cursor = nullptr;
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");