mn_counting_semaphore.hpp
Go to the documentation of this file.
1 
19 #ifndef MINLIB_ESP32_COUNTING_SEMAPHORE_
20 #define MINLIB_ESP32_COUNTING_SEMAPHORE_
21 
22 #include "mn_config.hpp"
23 #include "mn_basic_semaphore.hpp"
24 
25 namespace mn {
31  public:
47 
50 
53 
54  virtual ~basic_counting_semaphore();
55 
62  void set_initial_count(int count) { m_uiCount = count; }
69  void set_max_count(int count) { m_uiMaxCount = count; }
70 
76  int get_count() const;
77  protected:
78  int m_uiCount;
80  };
81 
83 }
84 
85 #endif
Definition: mn_counting_semaphore.hpp:30
basic_counting_semaphore(int count=MN_THREAD_CONFIG_CSEMAPHORE_MIN_COUNT, int maxcount=MN_THREAD_CONFIG_CSEMAPHORE_MAX_COUNT)
Definition: mn_counting_semaphore.cpp:29
void set_max_count(int count)
Definition: mn_counting_semaphore.hpp:69
int m_uiCount
Definition: mn_counting_semaphore.hpp:78
int m_uiMaxCount
Definition: mn_counting_semaphore.hpp:79
basic_counting_semaphore(basic_counting_semaphore &&o)
Definition: mn_counting_semaphore.hpp:51
virtual ~basic_counting_semaphore()
Definition: mn_counting_semaphore.cpp:52
void set_initial_count(int count)
Definition: mn_counting_semaphore.hpp:62
int get_count() const
Definition: mn_counting_semaphore.cpp:63
basic_counting_semaphore(const basic_counting_semaphore &o)
Definition: mn_counting_semaphore.hpp:48
Definition: mn_basic_semaphore.hpp:41
#define MN_THREAD_CONFIG_CSEMAPHORE_MIN_COUNT
Definition: mn_config.hpp:349
#define MN_THREAD_CONFIG_CSEMAPHORE_MAX_COUNT
Definition: mn_config.hpp:357
Definition: mn_allocator_typetraits.hpp:25
void move(const T *src, const T *last, T *dest)
Definition: mn_algorithm.hpp:100