X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dee01a09191bb846eb6174125ef3fa1c450303b4..4cf3bb0a2130b6a14986504ef1cd414472b91ede:/src/simix/ActorImpl.cpp diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index 95cec9d9f3..7047bb2d0e 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -146,7 +146,8 @@ void SIMIX_process_empty_trash() namespace simgrid { -namespace simix { +namespace kernel { +namespace actor { ActorImpl::~ActorImpl() { @@ -182,7 +183,7 @@ simgrid::s4u::Actor* ActorImpl::restart() // retrieve the arguments of the old process // FIXME: Factorize this with SIMIX_host_add_auto_restart_process ? - simgrid::simix::ProcessArg arg; + simgrid::kernel::actor::ProcessArg arg; arg.name = name; arg.code = code; arg.host = host; @@ -254,7 +255,7 @@ smx_activity_t ActorImpl::sleep(double duration) simgrid::kernel::activity::SleepImpl* synchro = new simgrid::kernel::activity::SleepImpl(); synchro->host = host; synchro->surf_sleep = host->pimpl_cpu->sleep(duration); - synchro->surf_sleep->setData(synchro); + synchro->surf_sleep->set_data(synchro); XBT_DEBUG("Create sleep synchronization %p", synchro); return synchro; @@ -264,7 +265,7 @@ void create_maestro(std::function code) { smx_actor_t maestro = nullptr; /* Create maestro process and initialize it */ - maestro = new simgrid::simix::ActorImpl(); + maestro = new simgrid::kernel::actor::ActorImpl(); maestro->pid = simix_process_maxpid++; maestro->name = ""; maestro->userdata = nullptr; @@ -281,13 +282,14 @@ void create_maestro(std::function code) simix_global->maestro_process = maestro; } +} // namespace actor } } /** @brief Creates and runs the maestro process */ void SIMIX_maestro_create(void (*code)(void*), void* data) { - simgrid::simix::create_maestro(std::bind(code, data)); + simgrid::kernel::actor::create_maestro(std::bind(code, data)); } /** @@ -310,7 +312,7 @@ smx_actor_t SIMIX_process_create(const char* name, std::function code, v return nullptr; } - smx_actor_t process = new simgrid::simix::ActorImpl(); + smx_actor_t process = new simgrid::kernel::actor::ActorImpl(); xbt_assert(code && host != nullptr, "Invalid parameters"); /* Process data */ @@ -372,7 +374,7 @@ smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostn return nullptr; } - smx_actor_t process = new simgrid::simix::ActorImpl(); + smx_actor_t process = new simgrid::kernel::actor::ActorImpl(); /* Process data */ process->pid = simix_process_maxpid++; process->name = std::string(name); @@ -812,8 +814,8 @@ void SIMIX_process_auto_restart_set(smx_actor_t process, int auto_restart) { * \param properties the properties of the process * \param auto_restart either it is autorestarting or not. */ -extern "C" smx_actor_t simcall_process_create(const char* name, xbt_main_func_t code, void* data, sg_host_t host, - int argc, char** argv, std::map* properties) +smx_actor_t simcall_process_create(const char* name, xbt_main_func_t code, void* data, sg_host_t host, int argc, + char** argv, std::map* properties) { if (name == nullptr) name = "";