Internal Interface Wrap
API reference
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
PlatformMutexImpl< Backend > Class Template Reference

Recursive mutex templated on a backend policy. More...

#include <PlatformMutex.h>

Public Member Functions

 PlatformMutexImpl () noexcept
 
 ~PlatformMutexImpl () noexcept
 
 PlatformMutexImpl (const PlatformMutexImpl &)=delete
 
PlatformMutexImpl & operator= (const PlatformMutexImpl &)=delete
 
 PlatformMutexImpl (PlatformMutexImpl &&other) noexcept
 
PlatformMutexImpl & operator= (PlatformMutexImpl &&other) noexcept
 
bool lock () noexcept
 
bool try_lock () noexcept
 
bool try_lock_for (uint32_t timeout_ms) noexcept
 
void unlock () noexcept
 
auto native_handle () const noexcept
 Access the underlying platform handle (for interop / diagnostics)
 
bool Take (uint32_t timeout_ms=0) noexcept
 
void Give () noexcept
 
bool lock_shared () noexcept
 
bool try_lock_shared () noexcept
 
bool try_lock_shared_for (uint32_t timeout_ms) noexcept
 
void unlock_shared () noexcept
 

Private Attributes

Backend::RecursiveMutexHandle handle_
 

Detailed Description

template<typename Backend = PlatformMutexActiveBackend>
class PlatformMutexImpl< Backend >

Recursive mutex templated on a backend policy.

When Backend = NullMutexBackend, the entire class compiles to nothing (1-byte handle member, all methods are no-ops). When a real RTOS backend is injected, this provides thread-safe recursive locking.

Template Parameters
BackendStatic policy class satisfying the NullMutexBackend contract.

Constructor & Destructor Documentation

◆ PlatformMutexImpl() [1/3]

template<typename Backend = PlatformMutexActiveBackend>
PlatformMutexImpl< Backend >::PlatformMutexImpl ( )
inlinenoexcept

◆ ~PlatformMutexImpl()

template<typename Backend = PlatformMutexActiveBackend>
PlatformMutexImpl< Backend >::~PlatformMutexImpl ( )
inlinenoexcept

◆ PlatformMutexImpl() [2/3]

template<typename Backend = PlatformMutexActiveBackend>
PlatformMutexImpl< Backend >::PlatformMutexImpl ( const PlatformMutexImpl< Backend > &  )
delete

◆ PlatformMutexImpl() [3/3]

template<typename Backend = PlatformMutexActiveBackend>
PlatformMutexImpl< Backend >::PlatformMutexImpl ( PlatformMutexImpl< Backend > &&  other)
inlinenoexcept

Member Function Documentation

◆ Give()

template<typename Backend = PlatformMutexActiveBackend>
void PlatformMutexImpl< Backend >::Give ( )
inlinenoexcept

◆ lock()

template<typename Backend = PlatformMutexActiveBackend>
bool PlatformMutexImpl< Backend >::lock ( )
inlinenoexcept

◆ lock_shared()

template<typename Backend = PlatformMutexActiveBackend>
bool PlatformMutexImpl< Backend >::lock_shared ( )
inlinenoexcept

◆ native_handle()

template<typename Backend = PlatformMutexActiveBackend>
auto PlatformMutexImpl< Backend >::native_handle ( ) const
inlinenoexcept

Access the underlying platform handle (for interop / diagnostics)

◆ operator=() [1/2]

template<typename Backend = PlatformMutexActiveBackend>
PlatformMutexImpl & PlatformMutexImpl< Backend >::operator= ( const PlatformMutexImpl< Backend > &  )
delete

◆ operator=() [2/2]

template<typename Backend = PlatformMutexActiveBackend>
PlatformMutexImpl & PlatformMutexImpl< Backend >::operator= ( PlatformMutexImpl< Backend > &&  other)
inlinenoexcept

◆ Take()

template<typename Backend = PlatformMutexActiveBackend>
bool PlatformMutexImpl< Backend >::Take ( uint32_t  timeout_ms = 0)
inlinenoexcept

◆ try_lock()

template<typename Backend = PlatformMutexActiveBackend>
bool PlatformMutexImpl< Backend >::try_lock ( )
inlinenoexcept

◆ try_lock_for()

template<typename Backend = PlatformMutexActiveBackend>
bool PlatformMutexImpl< Backend >::try_lock_for ( uint32_t  timeout_ms)
inlinenoexcept

◆ try_lock_shared()

template<typename Backend = PlatformMutexActiveBackend>
bool PlatformMutexImpl< Backend >::try_lock_shared ( )
inlinenoexcept

◆ try_lock_shared_for()

template<typename Backend = PlatformMutexActiveBackend>
bool PlatformMutexImpl< Backend >::try_lock_shared_for ( uint32_t  timeout_ms)
inlinenoexcept

◆ unlock()

template<typename Backend = PlatformMutexActiveBackend>
void PlatformMutexImpl< Backend >::unlock ( )
inlinenoexcept

◆ unlock_shared()

template<typename Backend = PlatformMutexActiveBackend>
void PlatformMutexImpl< Backend >::unlock_shared ( )
inlinenoexcept

Member Data Documentation

◆ handle_

template<typename Backend = PlatformMutexActiveBackend>
Backend::RecursiveMutexHandle PlatformMutexImpl< Backend >::handle_
private

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