| 348 | // Shared ownership |
| 349 | |
| 350 | inline void shared_mutex::lock_shared() |
| 351 | { |
| 352 | boost::unique_lock<mutex_t> lk(mut_); |
| 353 | gate1_.wait(lk, boost::bind(&shared_mutex::no_writer_no_max_readers, boost::ref(*this))); |
| 354 | count_t num_readers = (state_ & n_readers_) + 1; |
| 355 | state_ &= ~n_readers_; |
| 356 | state_ |= num_readers; |
| 357 | } |
| 358 | |
| 359 | inline bool shared_mutex::try_lock_shared() |
| 360 | { |
no test coverage detected