Lines Matching refs:T

38 pub struct RwLock<T> {
40 data: UnsafeCell<T>,
45 pub struct RwLockReadGuard<'a, T: 'a> {
46 data: *const T,
55 pub struct RwLockUpgradableGuard<'a, T: 'a> {
56 data: *const T,
57 inner: &'a RwLock<T>,
64 pub struct RwLockWriteGuard<'a, T: 'a> {
65 data: *mut T,
66 inner: &'a RwLock<T>,
70 unsafe impl<T: Send> Send for RwLock<T> {}
71 unsafe impl<T: Send + Sync> Sync for RwLock<T> {}
74 impl<T> RwLock<T> {
77 pub const fn new(data: T) -> Self { in new()
87 pub fn into_inner(self) -> T { in into_inner() argument
96 pub fn as_mut_ptr(&self) -> *mut T { in as_mut_ptr() argument
121 pub fn try_read(&self) -> Option<RwLockReadGuard<T>> { in try_read() argument
130 fn inner_try_read(&self) -> Option<RwLockReadGuard<T>> { in inner_try_read() argument
157 pub fn read(&self) -> RwLockReadGuard<T> { in read() argument
167 pub fn read_irqsave(&self) -> RwLockReadGuard<T> { in read_irqsave() argument
181 pub fn try_read_irqsave(&self) -> Option<RwLockReadGuard<T>> { in try_read_irqsave() argument
210 pub fn try_write(&self) -> Option<RwLockWriteGuard<T>> { in try_write() argument
223 pub fn try_write_irqsave(&self) -> Option<RwLockWriteGuard<T>> { in try_write_irqsave() argument
239 fn inner_try_write(&self) -> Option<RwLockWriteGuard<T>> { in inner_try_write() argument
259 pub fn write(&self) -> RwLockWriteGuard<T> { in write() argument
271 pub fn write_irqsave(&self) -> RwLockWriteGuard<T> { in write_irqsave() argument
287 pub fn try_upgradeable_read(&self) -> Option<RwLockUpgradableGuard<T>> { in try_upgradeable_read() argument
298 pub fn try_upgradeable_read_irqsave(&self) -> Option<RwLockUpgradableGuard<T>> { in try_upgradeable_read_irqsave() argument
311 fn inner_try_upgradeable_read(&self) -> Option<RwLockUpgradableGuard<T>> { in inner_try_upgradeable_read() argument
328 pub fn upgradeable_read(&self) -> RwLockUpgradableGuard<T> { in upgradeable_read() argument
339 pub fn upgradeable_read_irqsave(&self) -> RwLockUpgradableGuard<T> { in upgradeable_read_irqsave() argument
371 pub unsafe fn get_mut(&mut self) -> &mut T { in get_mut() argument
376 pub unsafe fn force_get_ref(&self) -> &T { in force_get_ref() argument
381 impl<T: Default> Default for RwLock<T> {
388 impl<T> From<T> for RwLock<T> {
389 fn from(data: T) -> Self { in from()
394 impl<'rwlock, T> RwLockReadGuard<'rwlock, T> {
405 pub unsafe fn leak(this: Self) -> &'rwlock T { in leak() argument
411 impl<'rwlock, T> RwLockUpgradableGuard<'rwlock, T> {
415 pub fn try_upgrade(mut self) -> Result<RwLockWriteGuard<'rwlock, T>, Self> { in try_upgrade() argument
442 pub fn upgrade(mut self) -> RwLockWriteGuard<'rwlock, T> { in upgrade() argument
456 pub fn downgrade(mut self) -> RwLockReadGuard<'rwlock, T> { in downgrade() argument
461 let inner: &RwLock<T> = self.inner; in downgrade()
483 pub unsafe fn leak(this: Self) -> &'rwlock T { in leak() argument
484 let this: ManuallyDrop<RwLockUpgradableGuard<'_, T>> = ManuallyDrop::new(this); in leak()
490 impl<'rwlock, T> RwLockWriteGuard<'rwlock, T> {
501 pub unsafe fn leak(this: Self) -> &'rwlock T { in leak() argument
510 pub fn downgrade(mut self) -> RwLockReadGuard<'rwlock, T> { in downgrade() argument
530 pub fn downgrade_to_upgradeable(mut self) -> RwLockUpgradableGuard<'rwlock, T> { in downgrade_to_upgradeable() argument
551 impl<'rwlock, T> Deref for RwLockReadGuard<'rwlock, T> {
552 type Target = T;
559 impl<'rwlock, T> Deref for RwLockUpgradableGuard<'rwlock, T> {
560 type Target = T;
567 impl<'rwlock, T> Deref for RwLockWriteGuard<'rwlock, T> {
568 type Target = T;
575 impl<'rwlock, T> DerefMut for RwLockWriteGuard<'rwlock, T> {
581 impl<'rwlock, T> Drop for RwLockReadGuard<'rwlock, T> {
589 impl<'rwlock, T> Drop for RwLockUpgradableGuard<'rwlock, T> {
601 impl<'rwlock, T> Drop for RwLockWriteGuard<'rwlock, T> {