MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / exchangeLower

Method exchangeLower

src/common/classes/fb_atomic.h:105–117  ·  view source on GitHub ↗

returns old value

Source from the content-addressed store, hash-verified

103
104 // returns old value
105 counter_type exchangeLower(counter_type val)
106 {
107 while (true)
108 {
109 counter_type oldVal = counter.load(std::memory_order_acquire);
110
111 if (oldVal <= val)
112 return oldVal;
113
114 if (counter.compare_exchange_strong(oldVal, val))
115 return oldVal;
116 }
117 }
118
119 void operator &=(counter_type val)
120 {

Callers 1

PAG_release_pagesFunction · 0.80

Calls 2

loadMethod · 0.45

Tested by

no test coverage detected