X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f734ec7475682eb90323e804cbcfddd7e4523992..d07b69d21eb5beec1c83d48437a43a0521d5c283:/src/simix/ActorImpl.hpp diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index a75c24ee96..b0c3b44917 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -13,11 +13,10 @@ #include #include -typedef struct s_smx_process_exit_fun { +struct s_smx_process_exit_fun_t { int_f_pvoid_pvoid_t fun; void *arg; -} s_smx_process_exit_fun_t; -typedef s_smx_process_exit_fun_t* smx_process_exit_fun_t; +}; namespace simgrid { namespace simix { @@ -39,7 +38,6 @@ public: ~ActorImpl(); // TODO, replace with boost intrusive container hooks - s_xbt_swag_hookup_t process_hookup = { nullptr, nullptr }; /* simix_global->process_list */ s_xbt_swag_hookup_t synchro_hookup = { nullptr, nullptr }; /* {mutex,cond,sem}->sleeping */ s_xbt_swag_hookup_t host_proc_hookup = { nullptr, nullptr }; /* smx_host->process_lis */ s_xbt_swag_hookup_t destroy_hookup = { nullptr, nullptr }; /* simix_global->process_to_destroy */ @@ -47,7 +45,8 @@ public: aid_t pid = 0; aid_t ppid = -1; simgrid::xbt::string name; - const char* cname() { return name.c_str(); } + const simgrid::xbt::string& getName() const { return name; } + const char* getCname() 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 */ @@ -122,7 +121,7 @@ typedef simgrid::simix::ProcessArg *smx_process_arg_t; typedef simgrid::simix::ActorImpl* smx_actor_t; -SG_BEGIN_DECL() +extern "C" { XBT_PRIVATE smx_actor_t SIMIX_process_create(const char* name, std::function code, void* data, sg_host_t host, std::map* properties, @@ -142,8 +141,7 @@ 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); 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_join(smx_actor_t issuer, smx_actor_t process, double timeout);