X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/68bf973c759c6eef597da8349276be4b60a6d124..1d17c885aa26ea6c36c1fc0c6ab39ddd5d509755:/src/simix/ActorImpl.hpp diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index 735335eaa7..16dca7c427 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -19,7 +19,8 @@ struct s_smx_process_exit_fun_t { }; namespace simgrid { -namespace simix { +namespace kernel { +namespace actor { class ProcessArg { public: @@ -56,12 +57,11 @@ public: aid_t pid = 0; aid_t ppid = -1; simgrid::xbt::string name; - const simgrid::xbt::string& getName() const { return name; } - const char* getCname() const { return name.c_str(); } + const simgrid::xbt::string& get_name() const { return name; } + const char* get_cname() const { return name.c_str(); } s4u::Host* host = nullptr; /* the host on which the process is running */ smx_context_t context = nullptr; /* the context (uctx/raw/thread) that executes the user function */ - // TODO, pack them std::exception_ptr exception; bool finished = false; bool blocked = false; @@ -70,7 +70,7 @@ public: smx_activity_t waiting_synchro = nullptr; /* the current blocking synchro if any */ std::list comms; /* the current non-blocking communication synchros */ - s_smx_simcall_t simcall; + s_smx_simcall simcall; void* userdata = nullptr; /* kept for compatibility, it should be replaced with moddata */ std::vector on_exit; /* list of functions executed when the process dies */ @@ -127,12 +127,13 @@ public: typedef boost::intrusive::list, &ActorImpl::smx_synchro_hook>> SynchroList; -} -} -typedef simgrid::simix::ActorImpl* smx_actor_t; +XBT_PUBLIC void create_maestro(std::function code); +} +} // namespace kernel +} // namespace simgrid -extern "C" { +typedef simgrid::kernel::actor::ActorImpl* smx_actor_t; XBT_PRIVATE smx_actor_t SIMIX_process_create(const char* name, std::function code, void* data, sg_host_t host, std::map* properties, @@ -140,18 +141,15 @@ XBT_PRIVATE smx_actor_t SIMIX_process_create(const char* name, std::function