Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Concatenate nested namespaces (sonar).
[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::mc {
12
13 class BarrierTransition : public Transition {
14   unsigned bar_;
15
16 public:
17   std::string to_string(bool verbose) const override;
18   BarrierTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream);
19   bool depends(const Transition* other) const override;
20 };
21
22 class MutexTransition : public Transition {
23   uintptr_t mutex_;
24   aid_t owner_;
25
26 public:
27   std::string to_string(bool verbose) const override;
28   MutexTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream);
29   bool depends(const Transition* other) const override;
30 };
31
32 class SemaphoreTransition : public Transition {
33   uintptr_t sem_;
34   bool granted_;
35
36 public:
37   std::string to_string(bool verbose) const override;
38   SemaphoreTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream);
39   bool depends(const Transition* other) const override;
40 };
41
42 } // namespace simgrid::mc
43
44 #endif