| 273 | // Exclusive ownership |
| 274 | |
| 275 | inline void shared_mutex::lock() |
| 276 | { |
| 277 | boost::unique_lock<mutex_t> lk(mut_); |
| 278 | gate1_.wait(lk, boost::bind(&shared_mutex::no_writer, boost::ref(*this))); |
| 279 | state_ |= write_entered_; |
| 280 | gate2_.wait(lk, boost::bind(&shared_mutex::no_readers, boost::ref(*this))); |
| 281 | } |
| 282 | |
| 283 | inline bool shared_mutex::try_lock() |
| 284 | { |