Lines Matching refs:lock
33 lock: AtomicU32, field
41 lock: &'a AtomicU32, field
70 lock: AtomicU32::new(0), in new()
97 let value = self.lock.fetch_add(READER, Ordering::Acquire); in current_reader()
101 self.lock.fetch_sub(READER, Ordering::Release); in current_reader()
126 self.lock.fetch_sub(READER, Ordering::Release); in try_read()
131 lock: &self.lock, in try_read()
152 let state = self.lock.load(Ordering::Relaxed); in reader_count()
160 return (self.lock.load(Ordering::Relaxed) & WRITER) / WRITER; in writer_count()
169 .lock in try_write()
201 if self.lock.fetch_or(UPGRADED, Ordering::Acquire) & (WRITER | UPGRADED) == 0 { in try_upgradeable_read()
228 debug_assert!(self.lock.load(Ordering::Relaxed) & !WRITER > 0); in force_read_decrement()
229 self.lock.fetch_sub(READER, Ordering::Release); in force_read_decrement()
237 debug_assert_eq!(self.lock.load(Ordering::Relaxed) & !(WRITER | UPGRADED), 0); in force_write_unlock()
238 self.lock.fetch_and(!(WRITER | UPGRADED), Ordering::Release); in force_write_unlock()
275 let res = self.inner.lock.compare_exchange( in try_upgrade()
326 lock: &inner.lock, in downgrade()
365 lock: &inner.lock, in downgrade()
374 self.inner.lock.load(Ordering::Acquire) & (WRITER | UPGRADED), in downgrade_to_upgradeable()
378 self.inner.lock.store(UPGRADED, Ordering::Release); in downgrade_to_upgradeable()
423 debug_assert!(self.lock.load(Ordering::Relaxed) & !(WRITER | UPGRADED) > 0); in drop()
424 self.lock.fetch_sub(READER, Ordering::Release); in drop()
431 self.inner.lock.load(Ordering::Relaxed) & (WRITER | UPGRADED), in drop()
434 self.inner.lock.fetch_sub(UPGRADED, Ordering::AcqRel); in drop()
441 debug_assert_eq!(self.inner.lock.load(Ordering::Relaxed) & WRITER, WRITER); in drop()
443 .lock in drop()