Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC: add an observer to sleep simcalls
[simgrid.git] / src / mc / transition / TransitionActor.cpp
similarity index 74%
rename from src/mc/transition/TransitionActorJoin.cpp
rename to src/mc/transition/TransitionActor.cpp
index 463bfcb..c0d04d1 100644 (file)
@@ -3,7 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "src/mc/transition/TransitionActorJoin.hpp"
+#include "src/mc/transition/TransitionActor.hpp"
 #include "simgrid/config.h"
 #include "xbt/asserts.h"
 #include "xbt/string.hpp"
@@ -43,4 +43,19 @@ bool ActorJoinTransition::depends(const Transition* other) const
   return false;
 }
 
+ActorSleepTransition::ActorSleepTransition(aid_t issuer, int times_considered, std::stringstream& stream)
+    : Transition(Type::ACTOR_SLEEP, issuer, times_considered)
+{
+  XBT_DEBUG("ActorSleepTransition()");
+}
+std::string ActorSleepTransition::to_string(bool verbose) const
+{
+  return xbt::string_printf("ActorSleep()");
+}
+bool ActorSleepTransition::depends(const Transition* other) const
+{
+  // Sleeping is indep with any other transitions: always enabled, not impacted by any transition
+  return false;
+}
+
 } // namespace simgrid::mc