class ScopedSpinGuard

Defined at line 46 of file ../../third_party/crashpad/src/util/synchronization/scoped_spin_guard.h

A scoped mutual-exclusion guard wrapping a `SpinGuardState` with RAII

semantics.

Public Methods

void ScopedSpinGuard (const ScopedSpinGuard & )

Defined at line 51 of file ../../third_party/crashpad/src/util/synchronization/scoped_spin_guard.h

ScopedSpinGuard & operator= (const ScopedSpinGuard & )

Defined at line 52 of file ../../third_party/crashpad/src/util/synchronization/scoped_spin_guard.h

void ScopedSpinGuard (ScopedSpinGuard && other)

Defined at line 53 of file ../../third_party/crashpad/src/util/synchronization/scoped_spin_guard.h

ScopedSpinGuard & operator= (ScopedSpinGuard && other)

Defined at line 56 of file ../../third_party/crashpad/src/util/synchronization/scoped_spin_guard.h

std::optional<ScopedSpinGuard> TryCreateScopedSpinGuard (uint64_t timeout_nanos, SpinGuardState & state)

Spins up to `timeout_nanos` nanoseconds trying to lock `state`.

Parameters

timeout_nanos [in] The timeout in nanoseconds after which this gives up trying to lock the spinlock and returns `std::nullopt`.
state [in,out] The spinlock state to attempt to lock. This method holds a pointer to `state`, so `state` must outlive the lifetime of this object.

Returns

The locked `ScopedSpinGuard` on success, or `std::nullopt` on

timeout.

Defined at line 69 of file ../../third_party/crashpad/src/util/synchronization/scoped_spin_guard.h

void ~ScopedSpinGuard ()

Defined at line 98 of file ../../third_party/crashpad/src/util/synchronization/scoped_spin_guard.h

void ScopedSpinGuard (SpinGuardState & locked_state)

A `ScopedSpinGuard` wrapping a locked `SpinGuardState`.

Parameters

locked_state [in,out] A locked `SpinGuardState`. This method holds a pointer to `state`, so `state` must outlive the lifetime of this object.

Defined at line 113 of file ../../third_party/crashpad/src/util/synchronization/scoped_spin_guard.h