X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d5e44448d02938865d85a9822070362195900bfb..323124aa9c477698fe9e0670c3a0ad4d41af5b22:/src/simix/ActorImpl.cpp diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index df96ad7120..9e256c9b72 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -237,13 +237,8 @@ void SIMIX_maestro_create(void (*code)(void*), void* data) * * \return the process created */ -smx_actor_t SIMIX_process_create( - const char *name, - std::function code, - void *data, - sg_host_t host, - xbt_dict_t properties, - smx_actor_t parent_process) +smx_actor_t SIMIX_process_create(const char* name, std::function code, void* data, simgrid::s4u::Host* host, + xbt_dict_t properties, smx_actor_t parent_process) { XBT_DEBUG("Start process %s on host '%s'", name, host->cname()); @@ -285,6 +280,10 @@ smx_actor_t SIMIX_process_create( /* Add properties */ process->properties = properties; + /* Make sure that the process is initialized for simix, in case we are called from the Host::onCreation signal */ + if (host->extension() == nullptr) + host->extension_set(new simgrid::simix::Host()); + /* Add the process to it's host process list */ xbt_swag_insert(process, host->extension()->process_list);