CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
RecursiveMutex Class Reference

Priority-inheriting recursive mutex. More...

#include <locks.hh>

Public Member Functions

bool try_lock (TimeoutArgument timeout)
 Attempt to acquire the lock, blocking until a timeout specified by the timeout parameter has expired.
bool try_lock ()
 Try to acquire the lock, do not block.
void lock ()
 Acquire the lock, potentially blocking forever.
void unlock ()
 Release the lock.
void upgrade_for_destruction ()
 Set the lock in destruction mode.

Detailed Description

Priority-inheriting recursive mutex.

This can be acquired multiple times from the same thread.

Definition at line 155 of file locks.hh.

Member Function Documentation

◆ lock()

void RecursiveMutex::lock ( )
inline

Acquire the lock, potentially blocking forever.

Definition at line 182 of file locks.hh.

References try_lock(), and UnlimitedTimeout.

◆ try_lock() [1/2]

bool RecursiveMutex::try_lock ( )
inline

Try to acquire the lock, do not block.

Definition at line 173 of file locks.hh.

References try_lock().

Referenced by lock(), and try_lock().

◆ try_lock() [2/2]

bool RecursiveMutex::try_lock ( TimeoutArgument timeout)
inline

Attempt to acquire the lock, blocking until a timeout specified by the timeout parameter has expired.

Definition at line 165 of file locks.hh.

References recursivemutex_trylock().

◆ unlock()

void RecursiveMutex::unlock ( )
inline

Release the lock.

Note: This does not check that the lock is owned by the calling thread.

Definition at line 193 of file locks.hh.

References recursivemutex_unlock().

◆ upgrade_for_destruction()

void RecursiveMutex::upgrade_for_destruction ( )
inline

Set the lock in destruction mode.

See the documentation of flaglock_upgrade_for_destruction for more information.

Definition at line 202 of file locks.hh.

References flaglock_upgrade_for_destruction().


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