Lines Matching refs:T
164 pub struct SpinLock<T> {
167 data: UnsafeCell<T>,
174 pub struct SpinLockGuard<'a, T: 'a> {
175 lock: &'a SpinLock<T>,
179 impl<'a, T: 'a> SpinLockGuard<'a, T> {
189 pub unsafe fn leak(this: Self) -> &'a mut T { in leak() argument
199 unsafe impl<T> Sync for SpinLock<T> where T: Send {}
201 impl<T> SpinLock<T> {
202 pub const fn new(value: T) -> Self { in new()
210 pub fn lock(&self) -> SpinLockGuard<T> { in lock() argument
219 pub fn lock_irqsave(&self) -> SpinLockGuard<T> { in lock_irqsave() argument
230 pub fn try_lock(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock() argument
240 pub fn try_lock_irqsave(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock_irqsave() argument
263 impl<T> Deref for SpinLockGuard<'_, T> {
264 type Target = T;
272 impl<T> DerefMut for SpinLockGuard<'_, T> {
279 impl<T> Drop for SpinLockGuard<'_, T> {