![]() |
OpenZWave Library 1.6.1914
|
Implements a platform-independent mutex–for serializing access to a shared resource. More...
#include <Mutex.h>
Public Member Functions | |
Mutex () | |
bool | Lock (bool const _bWait=true) |
void | Unlock () |
virtual bool | IsSignalled () |
![]() | |
void | AddWatcher (pfnWaitNotification_t _callback, void *_context) |
void | RemoveWatcher (pfnWaitNotification_t _callback, void *_context) |
![]() | |
Ref () | |
void | AddRef () |
int32 | Release () |
Protected Member Functions | |
~Mutex () | |
![]() | |
Wait () | |
virtual | ~Wait () |
void | Notify () |
![]() | |
virtual | ~Ref () |
Additional Inherited Members | |
![]() | |
enum | { Timeout_Immediate = 0 , Timeout_Infinite = -1 } |
typedef void(* | pfnWaitNotification_t) (void *_context) |
![]() | |
static int32 | Single (Wait *_object, int32 _timeout=-1) |
static int32 | Multiple (Wait **_objects, uint32 _numObjects, int32 _timeout=-1) |
Implements a platform-independent mutex–for serializing access to a shared resource.
OpenZWave::Internal::Platform::Mutex::Mutex | ( | ) |
Constructor. Creates a mutex object that can be used to serialize access to a shared resource.
|
protected |
Destructor. Destroys the mutex object.
|
virtual |
Used by the Wait class to test whether the mutex is free.
Implements OpenZWave::Internal::Platform::Wait.
bool OpenZWave::Internal::Platform::Mutex::Lock | ( | bool const | _bWait = true | ) |
Lock the mutex. Attempts to lock the mutex. There must be a matching call to Release for every call to Lock.
_bWait | Defaults to true. Set this argument to false if the method should return immediately, even if the lock is not available. |
void OpenZWave::Internal::Platform::Mutex::Unlock | ( | ) |
Releases the lock on the mutex. There must be a matching call to Release for every call to Lock.