#include <mn_counting_semaphore.hpp>
◆ basic_counting_semaphore() [1/3]
Create the counting semaphore
- Note
- When enabled the config item MN_THREAD_CONFIG_USE_LOCK_CREATE then throw on error the lockcreate_exception exceptions and the config item MN_THREAD_CONFIG_DEBUG enabled, then with debug informations. When the config item MN_THREAD_CONFIG_USE_LOCK_CREATE disabled then get the created error code with basic_semaphore::get_error()
- Parameters
-
count | Must not be greater than maxCount. |
maxcount | Must be greater than 0. |
◆ basic_counting_semaphore() [2/3]
◆ basic_counting_semaphore() [3/3]
◆ ~basic_counting_semaphore()
mn::basic_counting_semaphore::~basic_counting_semaphore |
( |
| ) |
|
|
virtual |
◆ get_count()
int mn::basic_counting_semaphore::get_count |
( |
| ) |
const |
Get the current count value.
- Returns
- The current count and 0 if the semaphore is not available.
◆ set_initial_count()
void mn::basic_counting_semaphore::set_initial_count |
( |
int |
count | ) |
|
|
inline |
Set the initial count
- Parameters
-
count | the new initial count |
- Note
- only call befor create, after this have no effect
◆ set_max_count()
void mn::basic_counting_semaphore::set_max_count |
( |
int |
count | ) |
|
|
inline |
Set the max count
- Parameters
-
- Note
- only call befor create, after this have no effect
◆ m_uiCount
int mn::basic_counting_semaphore::m_uiCount |
|
protected |
◆ m_uiMaxCount
int mn::basic_counting_semaphore::m_uiMaxCount |
|
protected |
The documentation for this class was generated from the following files: