#include "include/base/cef_atomic_ref_count.h"
◆ AtomicRefCount() [1/2]
constexpr base::AtomicRefCount::AtomicRefCount |
( |
| ) |
|
|
inlineconstexpr |
◆ AtomicRefCount() [2/2]
constexpr base::AtomicRefCount::AtomicRefCount |
( |
int |
initial_value | ) |
|
|
inlineexplicitconstexpr |
◆ Decrement()
bool base::AtomicRefCount::Decrement |
( |
| ) |
|
|
inline |
Decrement a reference count, and return whether the result is non-zero.
Insert barriers to ensure that state written before the reference count became zero will be visible to a thread that has just made the count zero.
◆ Increment() [1/2]
int base::AtomicRefCount::Increment |
( |
| ) |
|
|
inline |
Increment a reference count.
Returns the previous value of the count.
◆ Increment() [2/2]
int base::AtomicRefCount::Increment |
( |
int |
increment | ) |
|
|
inline |
Increment a reference count by "increment", which must exceed 0.
Returns the previous value of the count.
◆ IsOne()
bool base::AtomicRefCount::IsOne |
( |
| ) |
const |
|
inline |
Return whether the reference count is one.
If the reference count is used in the conventional way, a refrerence count of 1 implies that the current thread owns the reference and no other thread shares it. This call performs the test for a reference count of one, and performs the memory barrier needed for the owning thread to act on the object, knowing that it has exclusive access to the object.
◆ IsZero()
bool base::AtomicRefCount::IsZero |
( |
| ) |
const |
|
inline |
Return whether the reference count is zero.
With conventional object referencing counting, the object will be destroyed, so the reference count should never be zero. Hence this is generally used for a debug check.
◆ SubtleRefCountForDebug()
int base::AtomicRefCount::SubtleRefCountForDebug |
( |
| ) |
const |
|
inline |
Returns the current reference count (with no barriers).
This is subtle, and should be used only for debugging.
The documentation for this class was generated from the following file: