X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6dfbeafc01f45baadb4214d15cd0c703887d743e..aa4c04bd2a0667f488d1faf93e090756f7f98383:/src/simix/ActorImpl.hpp diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index e7dd3b0d06..6baac2c810 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -56,12 +56,12 @@ public: bool suspended = false; bool auto_restart = false; - sg_host_t new_host = nullptr; /* if not null, the host on which the process must migrate to */ + sg_host_t new_host = nullptr; /* if not null, the host on which the process must migrate to */ smx_activity_t waiting_synchro = nullptr; /* the current blocking synchro if any */ std::list comms; /* the current non-blocking communication synchros */ xbt_dict_t properties = nullptr; s_smx_simcall_t simcall; - void *data = nullptr; /* kept for compatibility, it should be replaced with moddata */ + void* userdata = nullptr; /* kept for compatibility, it should be replaced with moddata */ std::vector on_exit; /* list of functions executed when the process dies */ std::function code; @@ -106,7 +106,12 @@ public: void daemonize(); bool isDaemon() { return daemon; } /** Whether this actor has been daemonized */ bool isSuspended() { return suspended; } + ActorImpl* restart(ActorImpl* issuer); + smx_activity_t suspend(ActorImpl* issuer); void resume(); + smx_activity_t sleep(double duration); + void setUserData(void* data) { userdata = data; } + void* getUserData() { return userdata; } }; } @@ -138,15 +143,12 @@ XBT_PRIVATE void SIMIX_process_set_data(smx_actor_t process, void *data); XBT_PRIVATE smx_actor_t SIMIX_process_get_by_name(const char* name); XBT_PRIVATE void SIMIX_process_auto_restart_set(smx_actor_t process, int auto_restart); -XBT_PRIVATE smx_actor_t SIMIX_process_restart(smx_actor_t process, smx_actor_t issuer); extern void (*SMPI_switch_data_segment)(int dest); SG_END_DECL() XBT_PRIVATE void SIMIX_process_sleep_destroy(smx_activity_t synchro); -XBT_PRIVATE smx_activity_t SIMIX_process_suspend(smx_actor_t process, smx_actor_t issuer); XBT_PRIVATE smx_activity_t SIMIX_process_join(smx_actor_t issuer, smx_actor_t process, double timeout); -XBT_PRIVATE smx_activity_t SIMIX_process_sleep(smx_actor_t process, double duration); #endif