MCPcopy Create free account
hub / github.com/apache/impala / RefCountIsZero

Function RefCountIsZero

be/src/gutil/atomic_refcount.h:107–113  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

105// referencing counting, the object will be destroyed, so the reference count
106// should never be zero. Hence this is generally used for a debug check.
107inline bool RefCountIsZero(const volatile Atomic32 *ptr) {
108 bool res = (subtle::Acquire_Load(ptr) == 0);
109 if (res) {
110 ANNOTATE_HAPPENS_AFTER(ptr);
111 }
112 return res;
113}
114
115#if BASE_HAS_ATOMIC64
116// Implementations for Atomic64, if available.

Callers 1

ReleaseMethod · 0.85

Calls 1

Acquire_LoadFunction · 0.70

Tested by

no test coverage detected