Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add some signals
[simgrid.git] / src / kernel / activity / ExecImpl.hpp
index 2fe76ae..317d93c 100644 (file)
@@ -8,27 +8,31 @@
 
 #include "src/kernel/activity/ActivityImpl.hpp"
 #include "surf/surf.hpp"
+#include "xbt/Extendable.hpp"
 
 namespace simgrid {
 namespace kernel {
 namespace activity {
 
-XBT_PUBLIC_CLASS ExecImpl : public ActivityImpl
+XBT_PUBLIC_CLASS ExecImpl : public ActivityImpl, public simgrid::xbt::Extendable<ExecImpl>
 {
   ~ExecImpl() override;
 
 public:
-  ExecImpl(const char* name, sg_host_t host);
+  explicit ExecImpl(const char* name, sg_host_t host);
   void suspend() override;
   void resume() override;
   void post() override;
   double remains();
+  double remainingRatio();
 
-  sg_host_t host_ =
-      nullptr; /* The host where the execution takes place. If nullptr, then this is a parallel exec (and only surf
+  /* The host where the execution takes place. If nullptr, then this is a parallel exec (and only surf
                   knows the hosts) */
-  surf_action_t surf_exec       = nullptr; /* The Surf execution action encapsulated */
+  sg_host_t host_               = nullptr;
+  surf_action_t surfAction_     = nullptr; /* The Surf execution action encapsulated */
   surf::Action* timeoutDetector = nullptr;
+  static simgrid::xbt::signal<void(kernel::activity::ExecImplPtr)> onCreation;
+  static simgrid::xbt::signal<void(kernel::activity::ExecImplPtr)> onDestruction;
 };
 }
 }