X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/77bbf3027c4240a2e833209a3a3f186589da8577..956cb23848021301bcb4c20fd31675f65e4348e5:/src/simix/ActorImpl.hpp diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index 06d42dc7da..0fd300ad45 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -9,7 +9,7 @@ #include "simgrid/s4u/Actor.hpp" #include "src/simix/popping_private.hpp" #include "src/surf/PropertyHolder.hpp" -#include "xbt/swag.h" +#include #include #include @@ -37,11 +37,9 @@ public: ActorImpl() : piface_(this) {} ~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 */ + boost::intrusive::list_member_hook<> host_process_list_hook; /* simgrid::simix::Host::process_list */ + boost::intrusive::list_member_hook<> smx_destroy_list_hook; /* simix_global->process_to_destroy */ + boost::intrusive::list_member_hook<> smx_synchro_hook; /* {mutex,cond,sem}->sleeping */ aid_t pid = 0; aid_t ppid = -1; @@ -115,6 +113,10 @@ public: void* getUserData() { return userdata; } }; +/* Used to keep the list of actors blocked on a synchro */ +typedef boost::intrusive::list, + &ActorImpl::smx_synchro_hook>> + SynchroList; } }