tidy: format sources

This commit is contained in:
2021-10-18 12:07:28 +03:00
parent 3cd3e68de9
commit 573bc92523
15 changed files with 76 additions and 66 deletions
+4 -4
View File
@@ -1,8 +1,8 @@
//! Synchronization facilities module
use crate::arch::platform::{irq_mask_save, irq_restore};
use core::cell::UnsafeCell;
use core::ops::{Deref, DerefMut};
use crate::arch::platform::{irq_mask_save, irq_restore};
/// Same as [NullLock], but ensures IRQs are disabled while
/// the lock is held
@@ -14,7 +14,7 @@ pub struct IrqSafeNullLock<T: ?Sized> {
/// when dropped
pub struct IrqSafeNullLockGuard<'a, T: ?Sized> {
value: &'a mut T,
irq_state: u64
irq_state: u64,
}
impl<T> IrqSafeNullLock<T> {
@@ -22,7 +22,7 @@ impl<T> IrqSafeNullLock<T> {
#[inline(always)]
pub const fn new(value: T) -> Self {
Self {
value: UnsafeCell::new(value)
value: UnsafeCell::new(value),
}
}
@@ -32,7 +32,7 @@ impl<T> IrqSafeNullLock<T> {
unsafe {
IrqSafeNullLockGuard {
value: &mut *self.value.get(),
irq_state: irq_mask_save()
irq_state: irq_mask_save(),
}
}
}