X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/90bddc474870ce50b5398b88c7de59336d00a85f..7e625e5e848a284b522d69ec28cb111f1f88515b:/src/mc/transition/TransitionActor.cpp diff --git a/src/mc/transition/TransitionActor.cpp b/src/mc/transition/TransitionActor.cpp index 70608f14da..16a17a3d09 100644 --- a/src/mc/transition/TransitionActor.cpp +++ b/src/mc/transition/TransitionActor.cpp @@ -47,6 +47,19 @@ bool ActorJoinTransition::depends(const Transition* other) const return false; } +bool ActorJoinTransition::reversible_race(const Transition* other) const +{ + switch (type_) { + case Type::ACTOR_JOIN: + // ActorJoin races with another event iff its target `T` is the same as + // the actor executing the other transition. Clearly, then, we could not join + // on that actor `T` and then run a transition by `T`, so no race is reversible + return false; + default: + xbt_die("Unexpected transition type %s", to_c_str(type_)); + } +} + ActorSleepTransition::ActorSleepTransition(aid_t issuer, int times_considered, std::stringstream& stream) : Transition(Type::ACTOR_SLEEP, issuer, times_considered) { @@ -66,4 +79,14 @@ bool ActorSleepTransition::depends(const Transition* other) const return false; } +bool ActorSleepTransition::reversible_race(const Transition* other) const +{ + switch (type_) { + case Type::ACTOR_SLEEP: + return true; // Always enabled + default: + xbt_die("Unexpected transition type %s", to_c_str(type_)); + } +} + } // namespace simgrid::mc