Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Specialize the Activity on_veto, on_suspend and on_resume in AnyActivity to ease...
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 24 May 2023 00:02:02 +0000 (02:02 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 24 May 2023 00:09:53 +0000 (02:09 +0200)
18 files changed:
ChangeLog
docs/source/Plugins.rst
docs/source/app_s4u.rst
examples/cpp/dag-comm/s4u-dag-comm.cpp
examples/cpp/dag-comm/s4u-dag-comm.tesh
examples/cpp/dag-io/s4u-dag-io.cpp
examples/cpp/dag-io/s4u-dag-io.tesh
examples/cpp/dag-simple/s4u-dag-simple.cpp
examples/cpp/dag-simple/s4u-dag-simple.tesh
examples/cpp/exec-dependent/s4u-exec-dependent.cpp
include/simgrid/s4u/Activity.hpp
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/Exec.hpp
include/simgrid/s4u/Io.hpp
src/instr/instr_platform.cpp
src/kernel/activity/ActivityImpl.cpp
src/kernel/resource/VirtualMachineImpl.cpp
src/s4u/s4u_Activity.cpp

index 7e2ff0a..a90cc35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,8 @@ S4U:
  - Activity::on_resumed_cb() is renamed to Activity::on_resume_cb(), and fired right before the resume.
  - Resource::on_state_change_cb() is renamed to Resource::on_onoff_cb() to distinguish from the
    Activity::on_state_change_cb() that is related to the activity state machine, not on/off.
+ - Activity signals (veto, suspend, resume, completion) are now specialized by activity class.
+   That is, callbacks registered in Exec::on_suspend_cb will not be fired for Comms nor Ios.
 
 New S4U plugins:
  - Operation: They are designed to represent workflows, i.e, graphs of repeatable Activities.
index bbba377..bee80bc 100644 (file)
@@ -135,12 +135,23 @@ Partial list of existing signals in s4u:
   - :cpp:func:`Comm::on_send <simgrid::s4u::Comm::on_send_cb>`
     :cpp:func:`Comm::on_recv <simgrid::s4u::Comm::on_recv_cb>`
     :cpp:func:`Comm::on_completion <simgrid::s4u::Comm::on_completion_cb>`
+    :cpp:func:`Comm::on_suspend <simgrid::s4u::Comm::on_suspend_cb>`
+    :cpp:func:`Comm::on_resume <simgrid::s4u::Comm::on_resume_cb>`
+    :cpp:func:`Comm::on_veto <simgrid::s4u::Comm::on_veto_cb>`
   - :cpp:func:`CommImpl::on_start <simgrid::s4u::CommImpl::on_start_cb>`
     :cpp:func:`CommImpl::on_completion <simgrid::s4u::CommImpl::on_completion_cb>`
   - :cpp:func:`Exec::on_start <simgrid::s4u::Exec::on_start_cb>`
     :cpp:func:`Exec::on_completion <simgrid::s4u::Exec::on_completion_cb>`
+    :cpp:func:`Exec::on_completion <simgrid::s4u::Exec::on_completion_cb>`
+    :cpp:func:`Exec::on_suspend <simgrid::s4u::Exec::on_suspend_cb>`
+    :cpp:func:`Exec::on_resume <simgrid::s4u::Exec::on_resume_cb>`
+    :cpp:func:`Exec::on_veto <simgrid::s4u::Exec::on_veto_cb>`
   - :cpp:func:`Io::on_start <simgrid::s4u::Io::on_start_cb>`
     :cpp:func:`Io::on_completion <simgrid::s4u::Io::on_completion_cb>`
+    :cpp:func:`Io::on_completion <simgrid::s4u::Io::on_completion_cb>`
+    :cpp:func:`Io::on_suspend <simgrid::s4u::Io::on_suspend_cb>`
+    :cpp:func:`Io::on_resume <simgrid::s4u::Io::on_resume_cb>`
+    :cpp:func:`Io::on_veto <simgrid::s4u::Io::on_veto_cb>`
 
 Existing Plugins
 ****************
index a9f6507..34045cb 100644 (file)
@@ -2150,17 +2150,6 @@ Suspending and resuming an activity
       .. doxygenfunction:: simgrid::s4u::Activity::resume
       .. doxygenfunction:: simgrid::s4u::Activity::is_suspended
 
-Signals
--------
-
-.. tabs::
-
-   .. group-tab:: C++
-
-      .. doxygenfunction:: simgrid::s4u::Activity::on_completion_cb
-      .. doxygenfunction:: simgrid::s4u::Activity::on_suspended_cb
-      .. doxygenfunction:: simgrid::s4u::Activity::on_resumed_cb
-
 .. _API_s4u_Comm:
 
 =============
@@ -2325,6 +2314,11 @@ Signals
       .. doxygenfunction:: simgrid::s4u::Comm::on_recv_cb
       .. doxygenfunction:: simgrid::s4u::Comm::on_send_cb
 
+      .. doxygenfunction:: simgrid::s4u::Comm::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Comm::on_suspended_cb
+      .. doxygenfunction:: simgrid::s4u::Comm::on_resumed_cb
+      .. doxygenfunction:: simgrid::s4u::Comm::on_veto_cb
+
 .. _API_s4u_Exec:
 
 =============
@@ -2461,6 +2455,11 @@ Signals
       .. doxygenfunction:: simgrid::s4u::Exec::on_start_cb
       .. doxygenfunction:: simgrid::s4u::Exec::on_completion_cb
 
+      .. doxygenfunction:: simgrid::s4u::Exec::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Exec::on_suspended_cb
+      .. doxygenfunction:: simgrid::s4u::Exec::on_resumed_cb
+      .. doxygenfunction:: simgrid::s4u::Exec::on_veto_cb
+
 .. _API_s4u_Io:
 
 ===========
@@ -2532,6 +2531,11 @@ Signals
       .. doxygenfunction:: simgrid::s4u::Io::on_start_cb
       .. doxygenfunction:: simgrid::s4u::Io::on_completion_cb
 
+      .. doxygenfunction:: simgrid::s4u::Io::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Io::on_suspended_cb
+      .. doxygenfunction:: simgrid::s4u::Io::on_resumed_cb
+      .. doxygenfunction:: simgrid::s4u::Io::on_veto_cb
+
 .. _API_s4u_Synchronizations:
 
 =======================
index 2263b55..690f3f0 100644 (file)
@@ -20,9 +20,13 @@ int main(int argc, char* argv[])
   auto jupiter  = e.host_by_name("Jupiter");
 
   // Display the details on vetoed activities
-  sg4::Activity::on_veto_cb([](const sg4::Activity& a) {
-    XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", a.get_cname(),
-             (a.dependencies_solved() ? "solved" : "NOT solved"), (a.is_assigned() ? "assigned" : "NOT assigned"));
+  sg4::Exec::on_veto_cb([](sg4::Exec const& exec) {
+    XBT_INFO("Execution '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(),
+             (exec.dependencies_solved() ? "solved" : "NOT solved"), (exec.is_assigned() ? "assigned" : "NOT assigned"));
+  });
+  sg4::Comm::on_veto_cb([](sg4::Comm const& comm) {
+    XBT_INFO("Communication '%s' vetoed. Dependencies: %s; Ressources: %s", comm.get_cname(),
+             (comm.dependencies_solved() ? "solved" : "NOT solved"), (comm.is_assigned() ? "assigned" : "NOT assigned"));
   });
 
   sg4::Exec::on_completion_cb([](sg4::Exec const& exec) {
index 512c110..0024dd2 100644 (file)
@@ -1,13 +1,13 @@
 #!/usr/bin/env tesh
 
 $ ${bindir:=.}/s4u-dag-comm ${platfdir}/two_hosts.xml --log=s4u_activity.t:verbose "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Activity 'parent' vetoed. Dependencies: solved; Ressources: NOT assigned
-> [  0.000000] (0:maestro@) Activity 'transfer' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
-> [  0.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
+> [  0.000000] (0:maestro@) Execution 'parent' vetoed. Dependencies: solved; Ressources: NOT assigned
+> [  0.000000] (0:maestro@) Communication 'transfer' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
+> [  0.000000] (0:maestro@) Execution 'child' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
 > [  0.000000] (0:maestro@) 'parent' is assigned to a resource and all dependencies are solved. Let's start
-> [  0.000000] (0:maestro@) Activity 'transfer' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
-> [  0.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: NOT solved; Ressources: assigned
-> [  0.000000] (0:maestro@) Activity 'transfer' vetoed. Dependencies: NOT solved; Ressources: assigned
+> [  0.000000] (0:maestro@) Communication 'transfer' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
+> [  0.000000] (0:maestro@) Execution 'child' vetoed. Dependencies: NOT solved; Ressources: assigned
+> [  0.000000] (0:maestro@) Communication 'transfer' vetoed. Dependencies: NOT solved; Ressources: assigned
 > [  1.000000] (0:maestro@) Exec 'parent' is complete (start time: 0.000000, finish time: 1.000000)
 > [  1.000000] (0:maestro@) Remove a dependency from 'parent' on 'transfer'
 > [  1.000000] (0:maestro@) 'transfer' is assigned to a resource and all dependencies are solved. Let's start
index 7ac9b55..e86e3a8 100644 (file)
@@ -20,9 +20,13 @@ int main(int argc, char* argv[])
   auto carl = e.host_by_name("carl");
 
   // Display the details on vetoed activities
-  sg4::Activity::on_veto_cb([](const sg4::Activity& a) {
-    XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", a.get_cname(),
-             (a.dependencies_solved() ? "solved" : "NOT solved"), (a.is_assigned() ? "assigned" : "NOT assigned"));
+  sg4::Exec::on_veto_cb([](sg4::Exec const& exec) {
+    XBT_INFO("Exec '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(),
+             (exec.dependencies_solved() ? "solved" : "NOT solved"), (exec.is_assigned() ? "assigned" : "NOT assigned"));
+  });
+  sg4::Io::on_veto_cb([](sg4::Io const& io) {
+    XBT_INFO("Io '%s' vetoed. Dependencies: %s; Ressources: %s", io.get_cname(),
+             (io.dependencies_solved() ? "solved" : "NOT solved"), (io.is_assigned() ? "assigned" : "NOT assigned"));
   });
 
   sg4::Exec::on_completion_cb([](sg4::Exec const& exec) {
index d067ae0..8c1c3ca 100644 (file)
@@ -2,9 +2,9 @@
 
 $ ${bindir:=.}/s4u-dag-io ${platfdir}/hosts_with_disks.xml --log=s4u_activity.t:verbose "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) 'parent' is assigned to a resource and all dependencies are solved. Let's start
-> [  0.000000] (0:maestro@) Activity 'write' vetoed. Dependencies: NOT solved; Ressources: assigned
-> [  0.000000] (0:maestro@) Activity 'read' vetoed. Dependencies: NOT solved; Ressources: assigned
-> [  0.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: NOT solved; Ressources: assigned
+> [  0.000000] (0:maestro@) Io 'write' vetoed. Dependencies: NOT solved; Ressources: assigned
+> [  0.000000] (0:maestro@) Io 'read' vetoed. Dependencies: NOT solved; Ressources: assigned
+> [  0.000000] (0:maestro@) Exec 'child' vetoed. Dependencies: NOT solved; Ressources: assigned
 > [  1.000000] (0:maestro@) Exec 'parent' is complete (start time: 0.000000, finish time: 1.000000)
 > [  1.000000] (0:maestro@) Remove a dependency from 'parent' on 'write'
 > [  1.000000] (0:maestro@) 'write' is assigned to a resource and all dependencies are solved. Let's start
index c0c2a3e..8179729 100644 (file)
@@ -19,16 +19,16 @@ int main(int argc, char* argv[])
   auto fafard = e.host_by_name("Fafard");
 
   // Display the details on vetoed activities
-  sg4::Activity::on_veto_cb([](const sg4::Activity& a) {
+  sg4::Exec::on_veto_cb([](sg4::Exec const& a) {
     const auto& exec = static_cast<const sg4::Exec&>(a); // all activities are execs in this example
 
-    XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(),
+    XBT_INFO("Execution '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(),
              (exec.dependencies_solved() ? "solved" : "NOT solved"),
              (exec.is_assigned() ? "assigned" : "NOT assigned"));
   });
 
   sg4::Exec::on_completion_cb([](sg4::Exec const& exec) {
-    XBT_INFO("Activity '%s' is complete (start time: %f, finish time: %f)", exec.get_cname(), exec.get_start_time(),
+    XBT_INFO("Execution '%s' is complete (start time: %f, finish time: %f)", exec.get_cname(), exec.get_start_time(),
              exec.get_finish_time());
   });
 
index e41d10e..18b0d0b 100644 (file)
@@ -3,14 +3,14 @@
 $ ${bindir:=.}/s4u-dag-simple ${platfdir}/small_platform.xml --log=s4u_activity.t:verbose "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) 'parent 1' is assigned to a resource and all dependencies are solved. Let's start
 > [  0.000000] (0:maestro@) 'parent 2' is assigned to a resource and all dependencies are solved. Let's start
-> [  0.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
-> [  2.000000] (0:maestro@) Activity 'parent 1' is complete (start time: 0.000000, finish time: 2.000000)
+> [  0.000000] (0:maestro@) Execution 'child' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
+> [  2.000000] (0:maestro@) Execution 'parent 1' is complete (start time: 0.000000, finish time: 2.000000)
 > [  2.000000] (0:maestro@) Remove a dependency from 'parent 1' on 'child'
 > [  2.000000] (0:maestro@) Activity child not ready.
-> [  3.000000] (0:maestro@) Activity 'parent 2' is complete (start time: 0.000000, finish time: 3.000000)
+> [  3.000000] (0:maestro@) Execution 'parent 2' is complete (start time: 0.000000, finish time: 3.000000)
 > [  3.000000] (0:maestro@) Remove a dependency from 'parent 2' on 'child'
-> [  3.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: solved; Ressources: NOT assigned
+> [  3.000000] (0:maestro@) Execution 'child' vetoed. Dependencies: solved; Ressources: NOT assigned
 > [  3.000000] (0:maestro@) Activity child's dependencies are resolved. Let's assign it to Fafard.
 > [  3.000000] (0:maestro@) 'child' is assigned to a resource and all dependencies are solved. Let's start
-> [  4.000000] (0:maestro@) Activity 'child' is complete (start time: 3.000000, finish time: 4.000000)
+> [  4.000000] (0:maestro@) Execution 'child' is complete (start time: 3.000000, finish time: 4.000000)
 > [  4.000000] (0:maestro@) Simulation time 4
index a62cfd0..23e67b7 100644 (file)
@@ -54,8 +54,7 @@ int main(int argc, char* argv[])
 
   sg4::Actor::create("worker", e.host_by_name("Fafard"), worker);
 
-  sg4::Activity::on_veto_cb([&e](sg4::Activity& a) {
-    auto& exec = static_cast<sg4::Exec&>(a);
+  sg4::Exec::on_veto_cb([&e](sg4::Exec& exec) {
 
     // First display the situation
     XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(),
index ffd66d6..0dade94 100644 (file)
@@ -102,39 +102,12 @@ protected:
    * It is forbidden to change the amount of work once the Activity is started */
   Activity* set_remaining(double remains);
 
-  virtual void fire_this_completion() const = 0;
-
-private:
-  static xbt::signal<void(Activity&)> on_veto;
-  static xbt::signal<void(Activity const&)> on_suspend;
-  static xbt::signal<void(Activity const&)> on_resume;
+  virtual void fire_on_completion() const = 0;
+  virtual void fire_on_veto() const = 0;
+  virtual void fire_on_suspend() const = 0;
+  virtual void fire_on_resume() const = 0;
 
 public:
-  /*! Add a callback fired each time that the activity fails to start because of a veto (e.g., unsolved dependency or no
-   * resource assigned) */
-  static void on_veto_cb(const std::function<void(Activity&)>& cb) { on_veto.connect(cb); }
-  /*! Add a callback fired when the activity is suspended */
-  static void on_suspend_cb(const std::function<void(Activity const&)>& cb)
-  {
-    on_suspend.connect(cb);
-  }
-  /*! Add a callback fired when the activity is resumed after being suspended */
-  static void on_resume_cb(const std::function<void(Activity const&)>& cb)
-  {
-    on_resume.connect(cb);
-  }
-
-  XBT_ATTRIB_DEPRECATED_v337("Please use on_suspend_cb() instead") static void on_suspended_cb(
-      const std::function<void(Activity const&)>& cb)
-  {
-    on_suspend.connect(cb);
-  }
-  XBT_ATTRIB_DEPRECATED_v337("Please use on_resume_cb() instead") static void on_resumed_cb(
-      const std::function<void(Activity const&)>& cb)
-  {
-    on_resume.connect(cb);
-  }
-
   XBT_ATTRIB_DEPRECATED_v334("All start() are vetoable now. Please use start() ") void vetoable_start()
   {
     start();
@@ -148,7 +121,7 @@ public:
     } else {
       if (vetoed_activities_ != nullptr)
         vetoed_activities_->insert(this);
-      on_veto(*this);
+      fire_on_veto();
     }
   }
 
@@ -158,7 +131,7 @@ public:
     // released by the on_completion() callbacks.
     ActivityPtr keepalive(this);
     state_ = state;
-    fire_this_completion();
+    fire_on_completion();
     if (state == State::FINISHED)
       release_dependencies();
   }
@@ -258,10 +231,26 @@ template <class AnyActivity> class Activity_T : public Activity {
 
 protected:
   inline static xbt::signal<void(AnyActivity const&)> on_completion;
+  inline static xbt::signal<void(AnyActivity&)> on_veto;
+  inline static xbt::signal<void(AnyActivity const&)> on_suspend;
+  inline static xbt::signal<void(AnyActivity const&)> on_resume;
 
 public:
   /*! Add a callback fired when the activity completes (either normally, cancelled or failed) */
   static void on_completion_cb(const std::function<void(AnyActivity const&)>& cb) { on_completion.connect(cb); }
+  /*! Add a callback fired each time that the activity fails to start because of a veto (e.g., unsolved dependency or no
+   * resource assigned) */
+  static void on_veto_cb(const std::function<void(AnyActivity&)>& cb) { on_veto.connect(cb); }
+  /*! Add a callback fired when the activity is suspended */
+  static void on_suspend_cb(const std::function<void(AnyActivity const&)>& cb) { on_suspend.connect(cb); }
+  /*! Add a callback fired when the activity is resumed after being suspended */
+  static void on_resume_cb(const std::function<void(AnyActivity const&)>& cb) { on_resume.connect(cb); }
+
+  XBT_ATTRIB_DEPRECATED_v337("Please use on_suspend_cb() instead") static void on_suspended_cb(
+      const std::function<void(Activity const&)>& cb) { on_suspend.connect(cb); }
+  XBT_ATTRIB_DEPRECATED_v337("Please use on_resume_cb() instead") static void on_resumed_cb(
+      const std::function<void(Activity const&)>& cb) { on_resume.connect(cb);  }
+
 
   AnyActivity* add_successor(ActivityPtr a)
   {
index 46f7b4e..1a3488c 100644 (file)
@@ -43,7 +43,10 @@ class XBT_PUBLIC Comm : public Activity_T<Comm> {
   static xbt::signal<void(Comm const&)> on_start;
 
 protected:
-  void fire_this_completion() const override { on_completion(*this); }
+  void fire_on_completion() const override { on_completion(*this); }
+  void fire_on_veto() const override { on_veto(const_cast<Comm&>(*this)); }
+  void fire_on_suspend() const override { on_suspend(*this); }
+  void fire_on_resume() const override { on_resume(*this); }
 
 public:
   static void on_send_cb(const std::function<void(Comm const&)>& cb) { on_send.connect(cb); }
index df0183f..1f5d519 100644 (file)
@@ -43,7 +43,10 @@ protected:
   void reset() const;
 
   static xbt::signal<void(Exec const&)> on_start;
-  void fire_this_completion() const override { on_completion(*this); }
+  void fire_on_completion() const override { on_completion(*this); }
+  void fire_on_veto() const override { on_veto(const_cast<Exec&>(*this)); }
+  void fire_on_suspend() const override { on_suspend(*this); }
+  void fire_on_resume() const override { on_resume(*this); }
 
 public:
 #ifndef DOXYGEN
index fbab9a8..ec34612 100644 (file)
@@ -29,7 +29,10 @@ class XBT_PUBLIC Io : public Activity_T<Io> {
 protected:
   explicit Io(kernel::activity::IoImplPtr pimpl);
   Io* do_start() override;
-  void fire_this_completion() const override { on_completion(*this); }
+  void fire_on_completion() const override { on_completion(*this); }
+  void fire_on_veto() const override { on_veto(const_cast<Io&>(*this)); }
+  void fire_on_suspend() const override { on_suspend(*this); }
+  void fire_on_resume() const override { on_resume(*this); }
 
 public:
   enum class OpType { READ, WRITE };
index ed817d3..540a8dd 100644 (file)
@@ -479,8 +479,8 @@ void define_callbacks()
 
   s4u::Host::on_exec_state_change_cb(on_action_state_change);
   s4u::Link::on_communication_state_change_cb(on_action_state_change);
-  s4u::Activity::on_suspend_cb(on_activity_suspend_resume);
-  s4u::Activity::on_resume_cb(on_activity_suspend_resume);
+  s4u::Exec::on_suspend_cb(on_activity_suspend_resume);
+  s4u::Exec::on_resume_cb(on_activity_suspend_resume);
 
   if (TRACE_actor_is_enabled()) {
     s4u::Actor::on_creation_cb(on_actor_creation);
index aaaba06..d1bafa9 100644 (file)
@@ -181,7 +181,7 @@ void ActivityImpl::suspend()
     return;
   }
   XBT_VERB("This activity is suspended (remain: %f)", model_action_->get_remains());
-  s4u::Activity::on_suspend(*get_iface());
+  get_iface()->fire_on_suspend();
   model_action_->suspend();
 }
 
@@ -190,7 +190,7 @@ void ActivityImpl::resume()
   if (model_action_ == nullptr)
     return;
   XBT_VERB("This activity is resumed (remain: %f)", model_action_->get_remains());
-  s4u::Activity::on_resume(*get_iface());
+  get_iface()->fire_on_resume();
   model_action_->resume();
 }
 
index 1e6337b..b01f733 100644 (file)
@@ -123,8 +123,8 @@ VMModel::VMModel(const std::string& name) : HostModel(name)
   s4u::Host::on_onoff_cb(host_onoff);
   s4u::Exec::on_start_cb(add_active_exec);
   s4u::Exec::on_completion_cb(remove_active_exec);
-  s4u::Activity::on_resume_cb(add_active_activity);
-  s4u::Activity::on_suspend_cb(remove_active_activity);
+  s4u::Exec::on_resume_cb(add_active_activity);
+  s4u::Exec::on_suspend_cb(remove_active_activity);
 }
 
 double VMModel::next_occurring_event(double now)
index 78768d3..aa352f1 100644 (file)
@@ -24,10 +24,6 @@ template class xbt::Extendable<s4u::Activity>;
 
 namespace s4u {
 
-xbt::signal<void(Activity&)> Activity::on_veto;
-xbt::signal<void(Activity const&)> Activity::on_suspend;
-xbt::signal<void(Activity const&)> Activity::on_resume;
-
 std::set<Activity*>* Activity::vetoed_activities_ = nullptr;
 
 void Activity::destroy()