The Pedigree Project 0.1
Public Member Functions | List of all members
Mutex Class Reference

#include <Mutex.h>

+ Inheritance diagram for Mutex:
+ Collaboration diagram for Mutex:

Public Member Functions

 Mutex ()
 
 Mutex (bool)=delete
 
 ~Mutex ()
 
bool isOwnedByCurrentThread () const
 
- Public Member Functions inherited from Semaphore
 Semaphore (size_t nInitialValue, bool canInterrupt=true)
 
virtual ~Semaphore ()
 
MUST_USE_RESULT bool acquireWithError (size_t n, size_t timeoutSecs, size_t timeoutUsecs, SemaphoreError &error)
 
MUST_USE_RESULT bool acquireForCompletion (size_t n=1, size_t timeoutSecs=0, size_t timeoutUsecs=0)
 
bool acquire (size_t n=1, size_t timeoutSecs=0, size_t timeoutUsecs=0)
 
bool tryAcquire (size_t n=1)
 
MUST_USE_RESULT size_t drainAvailable ()
 
void release (size_t n=1)
 
ssize_t getValue ()
 
const void * getDebugMutexOwner () const
 

Additional Inherited Members

- Public Types inherited from Semaphore
enum  SemaphoreError { TimedOut , Interrupted , NoError }
 
- Protected Member Functions inherited from Semaphore
void initialiseMutex (bool locked)
 
void destroyMutex ()
 
bool mutexOwnedByCurrentThread () const
 

Detailed Description

An owner-tracked, non-recursive mutex.

Definition at line 56 of file Mutex.h.

Constructor & Destructor Documentation

◆ Mutex()

Mutex::Mutex ( )

Constructor

Definition at line 22 of file Mutex.cc.

References Semaphore::initialiseMutex().

◆ ~Mutex()

Mutex::~Mutex ( )

Destructor

Definition at line 26 of file Mutex.cc.

Member Function Documentation

◆ isOwnedByCurrentThread()

bool Mutex::isOwnedByCurrentThread ( ) const

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