uThreads  0.3.0
Public Member Functions | List of all members
OwnerLock Class Reference

an Owner Mutex where owner can recursively acquire the Mutex More...

#include <BlockingSync.h>

Inheritance diagram for OwnerLock:
Inheritance graph
[legend]
Collaboration diagram for OwnerLock:
Collaboration graph
[legend]

Public Member Functions

 OwnerLock ()
 Create a new OwnerLock.
 
mword acquire ()
 Acquire the OwnerLock. More...
 
mword release ()
 Release the OwnerLock once. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mutex
template<bool OL>
bool internalAcquire (mword timeout)
 
void internalRelease ()
 
template<bool OL = false>
bool acquire ()
 acquire the mutex More...
 
void release ()
 release the Mutex
 
void unlock ()
 
- Protected Attributes inherited from Mutex
std::mutex lock
 
BlockingQueue bq
 
uThreadowner
 

Detailed Description

an Owner Mutex where owner can recursively acquire the Mutex

Member Function Documentation

mword OwnerLock::acquire ( )
inline

Acquire the OwnerLock.

Returns
The number of times current owner acquired the lock
mword OwnerLock::release ( )
inline

Release the OwnerLock once.

Returns
The number of times current owner acquired the lock, if lock is released completely the result is 0

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