Skip to main content

IpcRequest

Struct IpcRequest 

Source
pub struct IpcRequest { /* private fields */ }
Available on crate feature unstable only.
Expand description

A function that Ipc::post runs on a CPU, and the state of its runs.

The IPC interrupt of the target CPU calls func at Priority::min. A request must be 'static, because the IPC can read and write it at any time after the first post. A request has at most one pending run. Two concurrent runs need two requests.

func must:

  • return,
  • not use the floating-point registers,
  • not enable interrupts, and not lower the run level,
  • not wait for a run on its own CPU.

A caller can stop its wait before the run starts, so func can run late. func must then find its protocol state stale, and do nothing.

Implementations§

Source§

impl IpcRequest

Source

pub const fn new(func: extern "C" fn()) -> Self

Creates a request that runs func.

Trait Implementations§

Source§

impl Debug for IpcRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for IpcRequest

§

impl Forget for IpcRequest

§

impl Move for IpcRequest

§

impl RefUnwindSafe for IpcRequest

§

impl Send for IpcRequest

§

impl Sync for IpcRequest

§

impl Unpin for IpcRequest

§

impl UnsafeUnpin for IpcRequest

§

impl UnwindSafe for IpcRequest

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.