Searched refs:RwState (Results 1 – 1 of 1) sorted by relevance
130 class RwState {157 LIBC_INLINE constexpr RwState(int state = 0) : state(state) {} in state()178 LIBC_INLINE constexpr RwState set_writer_bit() const { in set_writer_bit()179 return RwState(state | ACTIVE_WRITER_BIT); in set_writer_bit()201 LIBC_INLINE cpp::optional<RwState> try_increase_reader_count() const { in try_increase_reader_count()205 RwState res; in try_increase_reader_count()213 LIBC_INLINE static RwState fetch_sub_reader_count(cpp::Atomic<int> &target, in fetch_sub_reader_count()215 return RwState(target.fetch_sub(ACTIVE_READER_COUNT_UNIT, order)); in fetch_sub_reader_count()218 LIBC_INLINE static RwState load(cpp::Atomic<int> &target, in load()220 return RwState(target.load(order)); in load()[all …]