| 21 | namespace ruy { |
| 22 | |
| 23 | void BlockingCounter::Reset(int initial_count) { |
| 24 | int old_count_value = count_.load(std::memory_order_relaxed); |
| 25 | RUY_DCHECK_EQ(old_count_value, 0); |
| 26 | (void)old_count_value; |
| 27 | count_.store(initial_count, std::memory_order_release); |
| 28 | } |
| 29 | |
| 30 | bool BlockingCounter::DecrementCount() { |
| 31 | int old_count_value = count_.fetch_sub(1, std::memory_order_acq_rel); |
no test coverage detected