X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bd11885138355943e56e13d03850740ea2bcabd7..2685dbb427cbe90685e23c1000d8b6670bb91750:/src/kernel/actor/ActorImpl.cpp?ds=sidebyside diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index c8640b4762..c943038964 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -22,8 +22,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix, "Logging specific to SIMIX (process)"); -static unsigned long simix_process_maxpid = 0; - /** * @brief Returns the current agent. * @@ -53,9 +51,15 @@ namespace simgrid { namespace kernel { namespace actor { +static unsigned long maxpid = 0; +int get_maxpid() +{ + return maxpid; +} + ActorImpl::ActorImpl(const simgrid::xbt::string& name, s4u::Host* host) : host_(host), name_(name), piface_(this) { - pid_ = simix_process_maxpid++; + pid_ = maxpid++; simcall.issuer = this; } @@ -524,14 +528,14 @@ void create_maestro(const std::function& code) } // namespace kernel } // namespace simgrid -void SIMIX_process_detach() +void SIMIX_process_detach() // deprecated v3.25 { simgrid::kernel::actor::ActorImpl::detach(); } smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostname, std::unordered_map* properties, - smx_actor_t /*parent_process*/) + smx_actor_t /*parent_process*/) // deprecated 3.25 { return simgrid::kernel::actor::ActorImpl::attach(name, data, sg_host_by_name(hostname), properties).get(); } @@ -550,11 +554,6 @@ void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_actor_t actor) /* If we are suspending ourselves, then just do not finish the simcall now */ } -int SIMIX_process_get_maxpid() -{ - return simix_process_maxpid; -} - int SIMIX_process_count() { return simix_global->process_list.size();