X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2cf13759ba1696d88f5ff86afee5324f30ccdbfc..d15605f0ec704a59399fb71e6c145c72c4a9f1b0:/src/simix/ActorImpl.hpp diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index 1667712db0..a0c178d4d0 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -15,7 +15,7 @@ #include struct s_smx_process_exit_fun_t { - std::function fun; + std::function fun; void *arg; }; @@ -23,7 +23,7 @@ namespace simgrid { namespace kernel { namespace actor { -class ActorImpl : public surf::PropertyHolder { +class XBT_PUBLIC ActorImpl : public surf::PropertyHolder { s4u::Host* host_ = nullptr; /* the host on which the actor is running */ void* userdata_ = nullptr; /* kept for compatibility, it should be replaced with moddata */ aid_t pid_ = 0; @@ -34,6 +34,8 @@ class ActorImpl : public surf::PropertyHolder { public: xbt::string name_; ActorImpl(xbt::string name, s4u::Host* host); + ActorImpl(const ActorImpl&) = delete; + ActorImpl& operator=(const ActorImpl&) = delete; ~ActorImpl(); double get_kill_time(); @@ -70,7 +72,7 @@ public: std::vector on_exit; /* list of functions executed when the process dies */ std::function code; - smx_timer_t kill_timer = nullptr; + simix::Timer* kill_timer = nullptr; private: /* Refcounting */ @@ -105,6 +107,10 @@ public: static ActorImplPtr create(std::string name, simix::ActorCode code, void* data, s4u::Host* host, std::unordered_map* properties, ActorImpl* parent_actor); + static ActorImplPtr attach(std::string name, void* data, s4u::Host* host, + std::unordered_map* properties); + static void detach(); + void cleanup(); void exit(); void kill(ActorImpl* actor); void kill_all(); @@ -168,8 +174,6 @@ XBT_PUBLIC void create_maestro(std::function code); } // namespace kernel } // namespace simgrid -XBT_PRIVATE void SIMIX_process_cleanup(smx_actor_t arg); - extern void (*SMPI_switch_data_segment)(simgrid::s4u::ActorPtr actor); XBT_PRIVATE void SIMIX_process_sleep_destroy(smx_activity_t synchro);