| 287 | } |
| 288 | |
| 289 | inline auto inplace_stop_source::__lock_() const noexcept -> uint8_t |
| 290 | { |
| 291 | STDEXEC::__stok::__spin_wait __spin; |
| 292 | auto __old_state = __state_.load(STDEXEC::__std::memory_order_relaxed); |
| 293 | do |
| 294 | { |
| 295 | while ((__old_state & __locked_flag_) != 0) |
| 296 | { |
| 297 | __spin.__wait(); |
| 298 | __old_state = __state_.load(STDEXEC::__std::memory_order_relaxed); |
| 299 | } |
| 300 | } |
| 301 | while (!__state_.compare_exchange_weak(__old_state, |
| 302 | __old_state | __locked_flag_, |
| 303 | STDEXEC::__std::memory_order_acquire, |
| 304 | STDEXEC::__std::memory_order_relaxed)); |
| 305 | |
| 306 | return __old_state; |
| 307 | } |
| 308 | |
| 309 | inline void inplace_stop_source::__unlock_(uint8_t __old_state) const noexcept |
| 310 | { |
nothing calls this directly
no test coverage detected