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

Method exchangeBitAnd

src/common/classes/fb_atomic.h:68–76  ·  view source on GitHub ↗

returns old value

Source from the content-addressed store, hash-verified

66
67 // returns old value
68 counter_type exchangeBitAnd(counter_type val)
69 {
70 while (true)
71 {
72 counter_type oldVal = counter.load();
73 if (counter.compare_exchange_strong(oldVal, oldVal & val))
74 return oldVal;
75 }
76 }
77
78 // returns old value
79 counter_type exchangeBitOr(counter_type val)

Callers 1

Calls 2

loadMethod · 0.45

Tested by

no test coverage detected