Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Tidy SIMIX_process on_exit callbacks.
[simgrid.git] / src / kernel / actor / ActorImpl.hpp
index cef9f09..f4ee3a8 100644 (file)
 #include <map>
 #include <memory>
 
 #include <map>
 #include <memory>
 
-struct s_smx_process_exit_fun_t {
-  std::function<void(bool, void*)> fun;
-  void* arg;
-};
-
 namespace simgrid {
 namespace kernel {
 namespace actor {
 namespace simgrid {
 namespace kernel {
 namespace actor {
@@ -70,7 +65,7 @@ public:
   activity::ActivityImplPtr waiting_synchro = nullptr; /* the current blocking synchro if any */
   std::list<activity::ActivityImplPtr> comms;          /* the current non-blocking communication synchros */
   s_smx_simcall simcall;
   activity::ActivityImplPtr waiting_synchro = nullptr; /* the current blocking synchro if any */
   std::list<activity::ActivityImplPtr> comms;          /* the current non-blocking communication synchros */
   s_smx_simcall simcall;
-  std::vector<s_smx_process_exit_fun_t> on_exit; /* list of functions executed when the process dies */
+  std::vector<std::function<void(bool)>> on_exit; /* list of functions executed when the process dies */
 
   std::function<void()> code;
   simix::Timer* kill_timer = nullptr;
 
   std::function<void()> code;
   simix::Timer* kill_timer = nullptr;