Struct kernel::ipc::IPC
[−]
[src]
pub struct IPC { data: Grant<IPCData>, }
Fields
data: Grant<IPCData>
Methods
impl IPC
[src]
pub unsafe fn new() -> IPC
[src]
pub unsafe fn schedule_callback(
&self,
appid: AppId,
otherapp: AppId,
cb_type: IPCType
)
[src]
&self,
appid: AppId,
otherapp: AppId,
cb_type: IPCType
)
Trait Implementations
impl Driver for IPC
[src]
fn subscribe(&self, subscribe_num: usize, callback: Callback) -> 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]
&self,
target_id: usize,
client_or_svc: usize,
_: usize,
appid: AppId
) -> ReturnCode
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.
fn allow(
&self,
appid: AppId,
target_id: usize,
slice: AppSlice<Shared, u8>
) -> ReturnCode
[src]
&self,
appid: AppId,
target_id: usize,
slice: AppSlice<Shared, u8>
) -> ReturnCode
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.