returns old value
| 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) |
no test coverage detected