uThreads  0.3.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Mutex Class Reference

A user-level Mutex. More...

#include <BlockingSync.h>

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

Public Member Functions

template<bool OL = false>
bool acquire ()
 acquire the mutex More...
 
void release ()
 release the Mutex
 
void unlock ()
 

Protected Member Functions

template<bool OL>
bool internalAcquire (mword timeout)
 
void internalRelease ()
 

Protected Attributes

std::mutex lock
 
BlockingQueue bq
 
uThreadowner
 

Friends

class ConditionVariable
 
class Semaphore
 
class BlockingQueue
 

Detailed Description

A user-level Mutex.

Member Function Documentation

template<bool OL = false>
bool Mutex::acquire ( )
inline

acquire the mutex

Returns
true if it was acquired, false otherwise

The return value is only for when timeouts are implemented


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