Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
814908a998d1ce2654fb6103bba004f6b25af319
[simgrid.git] / src / mc / transition / TransitionSynchro.hpp
1 /* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_MC_TRANSITION_SYNCHRO_HPP
7 #define SIMGRID_MC_TRANSITION_SYNCHRO_HPP
8
9 #include "src/mc/transition/Transition.hpp"
10
11 namespace simgrid {
12 namespace mc {
13
14 class MutexTransition : public Transition {
15   uintptr_t mutex_;
16   aid_t owner_;
17
18 public:
19   std::string to_string(bool verbose) const override;
20   MutexTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream);
21   bool depends(const Transition* other) const override;
22 };
23
24 class SemaphoreTransition : public Transition {
25   uintptr_t sem_;
26   bool granted_;
27
28 public:
29   std::string to_string(bool verbose) const override;
30   SemaphoreTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream);
31   bool depends(const Transition* other) const override;
32 };
33
34 } // namespace mc
35 } // namespace simgrid
36
37 #endif