A scoped mutual-exclusion guard wrapping a SpinGuardState with RAII semantics.
More...
#include "util/synchronization/scoped_spin_guard.h"
A scoped mutual-exclusion guard wrapping a SpinGuardState with RAII semantics.
◆ ScopedSpinGuard()
| crashpad::ScopedSpinGuard::ScopedSpinGuard |
( |
SpinGuardState & | locked_state | ) |
|
|
inline |
◆ TryCreateScopedSpinGuard()
Spins up to timeout_nanos nanoseconds trying to lock state.
- Parameters
-
| [in] | timeout_nanos | The timeout in nanoseconds after which this gives up trying to lock the spinlock and returns std::nullopt. |
| [in,out] | state | 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.
The documentation for this class was generated from the following file:
- util/synchronization/scoped_spin_guard.h