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

Method Swap

be/src/common/atomic.h:110–112  ·  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

108 /// Store 'new_val' and return the previous value. Implies a Release memory barrier
109 /// (i.e. the same as Store()).
110 ALWAYS_INLINE T Swap(T new_val) {
111 return base::subtle::Release_AtomicExchange(&value_, new_val);
112 }
113
114 private:
115 T value_;

Callers 5

SubmitForAdmissionMethod · 0.45
SwapMethod · 0.45
InitMethod · 0.45

Calls 1

Release_AtomicExchangeFunction · 0.85

Tested by

no test coverage detected