MCPcopy Create free account
hub / github.com/cztomczak/cefpython / AtomicRefCountIsOne

Function AtomicRefCountIsOne

src/include/base/cef_atomic_ref_count.h:72–74  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

70// needed for the owning thread to act on the object, knowing that it has
71// exclusive access to the object.
72inline bool AtomicRefCountIsOne(volatile AtomicRefCount* ptr) {
73 return const_cast<AtomicRefCount*>(ptr)->IsOne();
74}
75
76// Return whether the reference count is zero. With conventional object
77// referencing counting, the object will be destroyed, so the reference count

Callers 1

HasOneRefMethod · 0.85

Calls 1

Acquire_LoadFunction · 0.50

Tested by

no test coverage detected