Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert simgrid::simix::Host::process_list to boost::intrusive::list.
[simgrid.git] / src / simix / ActorImpl.hpp
index cbe2eb9..e8cf408 100644 (file)
@@ -10,6 +10,7 @@
 #include "src/simix/popping_private.hpp"
 #include "src/surf/PropertyHolder.hpp"
 #include "xbt/swag.h"
+#include <boost/intrusive/list.hpp>
 #include <list>
 #include <map>
 
@@ -17,7 +18,6 @@ struct s_smx_process_exit_fun_t {
   int_f_pvoid_pvoid_t fun;
   void *arg;
 };
-typedef s_smx_process_exit_fun_t* smx_process_exit_fun_t;
 
 namespace simgrid {
 namespace simix {
@@ -39,10 +39,9 @@ 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 */
+  boost::intrusive::list_member_hook<> host_process_list_hook; /* simgrid::simix::Host::process_list */
 
   aid_t pid  = 0;
   aid_t ppid = -1;