Lines Matching defs:preference
182 // The preference parameter changes the behavior of the lock acquisition
186 template <Role role> LIBC_INLINE bool can_acquire(Role preference) const {
188 switch (preference) {
270 Role preference, unsigned spin_count) {
277 return state.can_acquire<Role::Reader>(preference) ||
288 return state.can_acquire<Role::Writer>(preference) ||
323 // Reader/Writer preference.
325 unsigned preference : 1;
336 // Load the bitfield preference.
338 return static_cast<Role>(preference);
372 LIBC_INLINE constexpr RwLock(Role preference = Role::Reader,
375 preference(static_cast<unsigned>(preference) & 1u), state(0),