returns old value
| 77 | |
| 78 | // returns old value |
| 79 | counter_type exchangeBitOr(counter_type val) |
| 80 | { |
| 81 | while (true) |
| 82 | { |
| 83 | counter_type oldVal = counter.load(); |
| 84 | if (counter.compare_exchange_strong(oldVal, oldVal | val)) |
| 85 | return oldVal; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | // returns old value |
| 90 | counter_type exchangeGreater(counter_type val) |
no test coverage detected