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

Method Swap

be/src/common/atomic.h:141–143  ·  view source on GitHub ↗

Store 'new_val' and return the previous value. Implies a Release memory barrier (i.e. the same as Store()).

Source from the content-addressed store, hash-verified

139 /// Store 'new_val' and return the previous value. Implies a Release memory barrier
140 /// (i.e. the same as Store()).
141 ALWAYS_INLINE T* Swap(T* val) {
142 return reinterpret_cast<T*>(ptr_.Swap(reinterpret_cast<intptr_t>(val)));
143 }
144 private:
145 internal::AtomicInt<intptr_t> ptr_;
146};

Callers

nothing calls this directly

Calls 1

SwapMethod · 0.45

Tested by

no test coverage detected