mn::basic_binary_semaphore Class Reference

#include <mn_binary_semaphore.hpp>

+ Inheritance diagram for mn::basic_binary_semaphore:
+ Collaboration diagram for mn::basic_binary_semaphore:

Public Member Functions

 basic_binary_semaphore ()
 
 basic_binary_semaphore (const basic_binary_semaphore &o)
 
virtual ~basic_binary_semaphore ()
 
- Public Member Functions inherited from mn::basic_semaphore
 basic_semaphore ()
 
 basic_semaphore (const basic_semaphore &other)
 
 basic_semaphore (basic_semaphore &&other)
 
virtual int lock (unsigned int timeout=MN_THREAD_CONFIG_TIMEOUT_SEMAPHORE_DEFAULT)
 
virtual int time_lock (const struct timespec *timeout)
 
virtual int unlock ()
 
void * get_handle ()
 
int get_error ()
 
virtual bool is_initialized () const
 
virtual bool is_locked () const
 Is locked? More...
 
bool operator== (const basic_semaphore &r) const
 
bool operator!= (const basic_semaphore &r) const
 
bool operator< (const basic_semaphore &r) const
 
bool operator> (const basic_semaphore &r) const
 
- Public Member Functions inherited from mn::ILockObject
 ILockObject ()
 
virtual bool try_lock ()
 

Additional Inherited Members

- Public Types inherited from mn::ILockObject
using this_type = ILockObject
 
- Protected Member Functions inherited from mn::basic_semaphore
void set_error (int error)
 
- Protected Attributes inherited from mn::basic_semaphore
void * m_pSpinlock
 
int m_iCreateErrorCode
 
bool m_isLocked
 

Constructor & Destructor Documentation

◆ basic_binary_semaphore() [1/2]

mn::basic_binary_semaphore::basic_binary_semaphore ( )

Create the binary semaphore

Note
When enabled the config item MN_THREAD_CONFIG_USE_EXCEPTIONS 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_EXCEPTIONS disabled then get the created error code with basic_semaphore::get_error()

◆ basic_binary_semaphore() [2/2]

mn::basic_binary_semaphore::basic_binary_semaphore ( const basic_binary_semaphore o)
inline

◆ ~basic_binary_semaphore()

mn::basic_binary_semaphore::~basic_binary_semaphore ( )
virtual

The documentation for this class was generated from the following files: