MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / unlock_shared

Method unlock_shared

extern/boost/boost/thread/v2/shared_mutex.hpp:407–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405#endif
406
407 inline void shared_mutex::unlock_shared()
408 {
409 boost::lock_guard<mutex_t> _(mut_);
410 BOOST_ASSERT(one_or_more_readers());
411 count_t num_readers = (state_ & n_readers_) - 1;
412 state_ &= ~n_readers_;
413 state_ |= num_readers;
414 if (no_writer())
415 {
416 if (num_readers == n_readers_ - 1)
417 gate1_.notify_one();
418 }
419 else
420 {
421 if (num_readers == 0)
422 gate2_.notify_one();
423 }
424 }
425
426 } // thread_v2
427} // boost

Callers 3

~shared_lock_guardMethod · 0.45
~shared_lockFunction · 0.45
unlockFunction · 0.45

Calls 1

notify_oneMethod · 0.45

Tested by

no test coverage detected