41 std::unique_lock<std::mutex>
lock(m_mutex);
42 const uint32_t num_readers = (m_state & readers_mask) - 1;
43 m_state &= ~readers_mask;
44 m_state |= num_readers;
45 if(m_state & is_writing) {
46 if(num_readers == 0) {
50 if(num_readers == readers_mask - 1) {