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
Collaboration diagram for Mutex:
Collaboration graph

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


class ConditionVariable
class Semaphore
class BlockingQueue

Detailed Description

A user-level Mutex.

Member Function Documentation

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

acquire the mutex

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: