ORIGINAL
Loading...
Searching...
No Matches
Public Member Functions | List of all members
original::mutexBase Class Referenceabstract

Abstract base class for mutex implementations. More...

#include <mutex.h>

Inheritance diagram for original::mutexBase:
Inheritance graph
Collaboration diagram for original::mutexBase:
Collaboration graph

Public Member Functions

virtual void lock ()=0
 Locks the mutex, blocking if necessary.
 
virtual bool tryLock ()=0
 Attempts to lock the mutex without blocking.
 
virtual void unlock ()=0
 Unlocks the mutex.
 
virtual ul_integer id () const =0
 Gets a unique identifier for the mutex.
 
 mutexBase ()=default
 Default constructor.
 
 mutexBase (const mutexBase &)=delete
 Deleted copy constructor.
 
mutexBaseoperator= (const mutexBase &)=delete
 Deleted copy assignment operator.
 
virtual voidnativeHandle () noexcept=0
 Gets the native handle of the mutex.
 
virtual ~mutexBase ()=default
 Virtual destructor.
 

Detailed Description

Abstract base class for mutex implementations.

Provides the interface for mutex operations including:

Note
This is an abstract base class and cannot be instantiated directly. Derived classes must implement all pure virtual methods.

Member Function Documentation

◆ id()

virtual ul_integer original::mutexBase::id ( ) const
pure virtual

Gets a unique identifier for the mutex.

Returns
Unique identifier based on mutex internal state

Implemented in original::mutex.

◆ lock()

virtual void original::mutexBase::lock ( )
pure virtual

Locks the mutex, blocking if necessary.

Exceptions
sysErrorif the lock operation fails

Implemented in original::mutex.

◆ nativeHandle()

virtual void * original::mutexBase::nativeHandle ( )
pure virtualnoexcept

Gets the native handle of the mutex.

Returns
Pointer to the native mutex handle

Implemented in original::mutex.

◆ tryLock()

virtual bool original::mutexBase::tryLock ( )
pure virtual

Attempts to lock the mutex without blocking.

Returns
true if lock was acquired, false otherwise
Exceptions
sysErrorif the operation fails (other than EBUSY)

Implemented in original::mutex.

◆ unlock()

virtual void original::mutexBase::unlock ( )
pure virtual

Unlocks the mutex.

Exceptions
sysErrorif the unlock operation fails

Implemented in original::mutex.


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