StdMutex

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

NameDescription
std::mutex

Types

NameDescription
Guard An annotated version of std::lock_guard for StdMutex.

Type Aliases

Name
native_handle_type

Member Functions

NameDescription
operator= [deleted]
lock
native_handle
try_lock
unlock
operator! Expose the mutex as a negative capability for Clang Thread Safety Analysis.

Static Member Functions

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