[][src]Struct kernel::ipc::IPC

pub struct IPC {
    data: Grant<IPCData>,
}

Fields

data: Grant<IPCData>

Methods

impl IPC[src]

pub fn new(
    kernel: &'static Kernel,
    capability: &dyn MemoryAllocationCapability
) -> IPC
[src]

pub unsafe fn schedule_callback(
    &self,
    appid: AppId,
    otherapp: AppId,
    cb_type: IPCType
)
[src]

Trait Implementations

impl Driver for IPC[src]

fn subscribe(
    &self,
    subscribe_num: usize,
    callback: Option<Callback>,
    app_id: AppId
) -> ReturnCode
[src]

subscribe enables processes using IPC to register callbacks that fire when notify() is called.

fn command(
    &self,
    target_id: usize,
    client_or_svc: usize,
    _: usize,
    appid: AppId
) -> ReturnCode
[src]

command is how notify() is implemented. Notifying an IPC service is done by setting client_or_svc to 0, and notifying an IPC client is done by setting client_or_svc to 1. In either case, the target_id is the same number as provided in a notify callback or as returned by allow.

Returns EINVAL if the other process doesn't exist.

fn allow(
    &self,
    appid: AppId,
    target_id: usize,
    slice: Option<AppSlice<Shared, u8>>
) -> ReturnCode
[src]

allow enables processes to discover IPC services on the platform or share buffers with existing services.

If allow is called with target_id == 0, it is an IPC service discover call. The contents of the slice should be the string name of the IPC service. If this mechanism can find that service, allow will return an ID that can be used to notify that service. Otherwise an error will be returned.

If allow is called with target_id >= 1, it is a share command where the application is explicitly sharing a slice with an IPC service (as specified by the target_id). allow() simply allows both processes to access the buffer, it does not signal the service.

Auto Trait Implementations

impl !Send for IPC

impl !Sync for IPC

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]