Lines Matching refs:lock
36 lock: AtomicU32, field
44 lock: &'a AtomicU32, field
73 lock: AtomicU32::new(0), in new()
100 let value = self.lock.fetch_add(READER, Ordering::Acquire); in current_reader()
104 self.lock.fetch_sub(READER, Ordering::Release); in current_reader()
138 self.lock.fetch_sub(READER, Ordering::Release); in inner_try_read()
143 lock: &self.lock, in inner_try_read()
164 let state = self.lock.load(Ordering::Relaxed); in reader_count()
172 return (self.lock.load(Ordering::Relaxed) & WRITER) / WRITER; in writer_count()
193 .lock in inner_try_write()
235 if self.lock.fetch_or(UPGRADED, Ordering::Acquire) & (WRITER | UPGRADED) == 0 { in inner_try_upgradeable_read()
262 debug_assert!(self.lock.load(Ordering::Relaxed) & !WRITER > 0); in force_read_decrement()
263 self.lock.fetch_sub(READER, Ordering::Release); in force_read_decrement()
271 debug_assert_eq!(self.lock.load(Ordering::Relaxed) & !(WRITER | UPGRADED), 0); in force_write_unlock()
272 self.lock.fetch_and(!(WRITER | UPGRADED), Ordering::Release); in force_write_unlock()
316 let res = self.inner.lock.compare_exchange( in try_upgrade()
367 lock: &inner.lock, in downgrade()
420 lock: &inner.lock, in downgrade()
429 self.inner.lock.load(Ordering::Acquire) & (WRITER | UPGRADED), in downgrade_to_upgradeable()
433 self.inner.lock.store(UPGRADED, Ordering::Release); in downgrade_to_upgradeable()
478 debug_assert!(self.lock.load(Ordering::Relaxed) & !(WRITER | UPGRADED) > 0); in drop()
479 self.lock.fetch_sub(READER, Ordering::Release); in drop()
487 self.inner.lock.load(Ordering::Relaxed) & (WRITER | UPGRADED), in drop()
490 self.inner.lock.fetch_sub(UPGRADED, Ordering::AcqRel); in drop()
498 debug_assert_eq!(self.inner.lock.load(Ordering::Relaxed) & WRITER, WRITER); in drop()
500 .lock in drop()