adapnex::core::Mutex

Mutex defines the interface for platform‐agnostic lock that conforms to BasicLockable and Lockable. This Mutex should be used instead of standard library types like std::lock to ensure priority inheritance is used on real‐time capable platforms.

Synopsis

Declared in <adapnex/core/sync.h>

class Mutex;

Member Functions

Name

Description

~Mutex [destructor] [virtual]

Destructor

lock [virtual]

Blocks until a lock can be acquired for the current execution agent (thread, process, task). If an exception is thrown, no lock is acquired.

try_lock [virtual]

Attempts to acquire the lock for the current execution agent (thread, process, task) without blocking. If an exception is thrown, no lock is obtained.

unlock [virtual]

Releases the non‐shared lock held by the execution agent. Throws no exceptions.

Static Member Functions

Name

Description

Create

Returns a Mutex implementation suitable for the current platform.

Created with MrDocs