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

Function RefCountDec

be/src/gutil/atomic_refcount.h:84–86  ·  view source on GitHub ↗

Decrement a reference count by 1 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.

Source from the content-addressed store, hash-verified

82// Insert barriers to ensure that state written before the reference count
83// became zero will be visible to a thread that has just made the count zero.
84inline bool RefCountDec(volatile Atomic32 *ptr) {
85 return base::RefCountDecN(ptr, 1);
86}
87
88// Return whether the reference count is one.
89// If the reference count is used in the conventional way, a

Callers 2

UnrefMethod · 0.85
ReleaseMethod · 0.85

Calls 1

RefCountDecNFunction · 0.85

Tested by

no test coverage detected