Lines Matching refs:T
17 pub struct SpinLock<T> {
20 data: UnsafeCell<T>,
27 pub struct SpinLockGuard<'a, T: 'a> {
28 lock: &'a SpinLock<T>,
29 data: *mut T,
34 impl<'a, T: 'a> SpinLockGuard<'a, T> {
44 pub unsafe fn leak(this: Self) -> &'a mut T { in leak() argument
60 unsafe impl<T> Sync for SpinLock<T> where T: Send {}
62 impl<T> SpinLock<T> {
63 pub const fn new(value: T) -> Self { in new()
71 pub fn lock(&self) -> SpinLockGuard<T> { in lock() argument
83 pub fn lock_no_preempt(&self) -> SpinLockGuard<T> { in lock_no_preempt() argument
92 pub fn lock_irqsave(&self) -> SpinLockGuard<T> { in lock_irqsave() argument
101 pub fn try_lock(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock() argument
128 pub fn try_lock_irqsave(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock_irqsave() argument
144 pub fn try_lock_no_preempt(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock_no_preempt() argument
177 impl<T> Deref for SpinLockGuard<'_, T> {
178 type Target = T;
186 impl<T> DerefMut for SpinLockGuard<'_, T> {
193 impl<T> Drop for SpinLockGuard<'_, T> {