Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement pthread_join in MC mode for sthread
[simgrid.git] / src / mc / transition / TransitionActorJoin.hpp
diff --git a/src/mc/transition/TransitionActorJoin.hpp b/src/mc/transition/TransitionActorJoin.hpp
new file mode 100644 (file)
index 0000000..da06a33
--- /dev/null
@@ -0,0 +1,34 @@
+/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved.          */
+
+/* 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. */
+
+#ifndef SIMGRID_MC_TRANSITION_ACTOR_JOIN_HPP
+#define SIMGRID_MC_TRANSITION_ACTOR_JOIN_HPP
+
+#include "src/kernel/actor/SimcallObserver.hpp"
+#include "src/mc/transition/Transition.hpp"
+
+#include <cstdint>
+#include <sstream>
+#include <string>
+
+namespace simgrid::mc {
+
+class ActorJoinTransition : public Transition {
+  bool timeout_;
+  aid_t target_;
+
+public:
+  ActorJoinTransition(aid_t issuer, int times_considered, std::stringstream& stream);
+  std::string to_string(bool verbose) const override;
+  bool depends(const Transition* other) const override;
+
+  bool get_timeout() const { return timeout_; }
+  /** Target ID */
+  aid_t get_target() const { return target_; }
+};
+
+} // namespace simgrid::mc
+
+#endif