pub struct FRAME_ALLOCATOR {
__private_field: (),
}Expand description
全局物理帧分配器,由自旋锁保护。
Fields§
§__private_field: ()Methods from Deref<Target = SpinLock<FrameAllocator>>§
Sourcepub fn lock(&self) -> SpinLockGuard<'_, T>
pub fn lock(&self) -> SpinLockGuard<'_, T>
获取自旋锁,并返回一个 RAII 保护器,用于访问和修改内部数据。
Sourcepub fn try_lock(&self) -> Option<SpinLockGuard<'_, T>>
pub fn try_lock(&self) -> Option<SpinLockGuard<'_, T>>
尝试获取自旋锁,如果成功则返回 RAII 保护器,否则返回 None。
Trait Implementations§
Source§impl Deref for FRAME_ALLOCATOR
impl Deref for FRAME_ALLOCATOR
Source§type Target = SpinLock<FrameAllocator>
type Target = SpinLock<FrameAllocator>
The resulting type after dereferencing.
Source§fn deref(&self) -> &SpinLock<FrameAllocator>
fn deref(&self) -> &SpinLock<FrameAllocator>
Dereferences the value.
impl LazyStatic for FRAME_ALLOCATOR
Auto Trait Implementations§
impl Freeze for FRAME_ALLOCATOR
impl RefUnwindSafe for FRAME_ALLOCATOR
impl Send for FRAME_ALLOCATOR
impl Sync for FRAME_ALLOCATOR
impl Unpin for FRAME_ALLOCATOR
impl UnwindSafe for FRAME_ALLOCATOR
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more