An annotated version of std::mutex for Clang Thread Safety Analysis.

Synopsis

Declared in <util/stdmutex.h>

class [[capability]] StdMutex
    : public std::mutex

Description

Should only be used when the sync.h Mutex/LOCK primitives are not usable.

Base Classes

Name

Description

std::mutex

Types

Name

Description

Guard

An annotated version of std::lock_guard for StdMutex.

Type Aliases

Member Functions

Name

Description

operator= [deleted]

lock

native_handle

try_lock

unlock

operator!

Expose the mutex as a negative capability for Clang Thread Safety Analysis.

Static Member Functions

Name

Description

CheckNotHeld

Assert (for the analyzer) that a mutex is not currently held and return it.

Created with MrDocs