Skip to content

LockedBox use examples #99

@solkitten

Description

@solkitten

Could you please give some examples how to use LockedBox?
I have a code like this:

#[repr(C, packed)]
#[derive(Debug, Clone, Copy, DeviceCopy)]
pub struct SomeResult {
    pub field: u32
}
...
let mut some_result = SomeResult::default();
let mut lb_some_result = LockedBox::new(&some_result).unwrap();

What should I do to copy it to DeviceBox and back from DeviceBox after the kernel finishes? Things like
let dev_results = DeviceBox::new(&lb_some_result).unwrap();
are not working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions