Type Alias KBox

Source
pub type KBox<T> = Box<T, Kmalloc>;
Expand description

Type alias for Box with a Kmalloc allocator.

§Examples

let b = KBox::new(24_u64, GFP_KERNEL)?;

assert_eq!(*b, 24_u64);

Aliased Type§

struct KBox<T>(/* private fields */);

Trait Implementations§

Source§

impl<T, const ID: u64> RawWorkItem<ID> for Pin<KBox<T>>
where T: WorkItem<ID, Pointer = Self> + HasWork<T, ID>,

Source§

type EnqueueOutput = ()

The return type of Queue::enqueue.
Source§

unsafe fn __enqueue<F>(self, queue_work_on: F) -> Self::EnqueueOutput
where F: FnOnce(*mut work_struct) -> bool,

Enqueues this work item on a queue using the provided queue_work_on method. Read more
Source§

impl<T, const ID: u64> WorkItemPointer<ID> for Pin<KBox<T>>
where T: WorkItem<ID, Pointer = Self> + HasWork<T, ID>,

Source§

unsafe extern "C" fn run(ptr: *mut work_struct)

Run this work item. Read more