pub struct IPC<const NUM_PROCS: u8> { /* private fields */ }
Expand description
The IPC mechanism struct.
Implementations§
Trait Implementations§
Source§impl<const NUM_PROCS: u8> SyscallDriver for IPC<NUM_PROCS>
impl<const NUM_PROCS: u8> SyscallDriver for IPC<NUM_PROCS>
Source§fn command(
&self,
command_number: usize,
target_id: usize,
_: usize,
processid: ProcessId,
) -> CommandReturn
fn command( &self, command_number: usize, target_id: usize, _: usize, processid: ProcessId, ) -> CommandReturn
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 upcall or as returned by allow.
Returns INVAL if the other process doesn’t exist. Initiates a service discovery or notifies a client or service.
§command_num
0
: Driver existence check, always returns Ok(())1
: Perform discovery on the package name passed toallow_readonly
. Returns the service descriptor if the service is found, otherwise returns an error.2
: Notify a service previously discovered to have the service descriptor intarget_id
. Returns an error iftarget_id
refers to an invalid service or the notify fails to enqueue.3
: Notify a client with descriptortarget_id
, typically in response to a previous notify from the client. Returns an error iftarget_id
refers to an invalid client or the notify fails to enqueue.
Source§fn allocate_grant(&self, processid: ProcessId) -> Result<(), Error>
fn allocate_grant(&self, processid: ProcessId) -> Result<(), Error>
Request to allocate a capsule’s grant for a specific process. Read more
Source§fn allow_userspace_readable(
&self,
app: ProcessId,
which: usize,
slice: UserspaceReadableProcessBuffer,
) -> Result<UserspaceReadableProcessBuffer, (UserspaceReadableProcessBuffer, ErrorCode)>
fn allow_userspace_readable( &self, app: ProcessId, which: usize, slice: UserspaceReadableProcessBuffer, ) -> Result<UserspaceReadableProcessBuffer, (UserspaceReadableProcessBuffer, ErrorCode)>
System call for a process to pass a buffer (a
UserspaceReadableProcessBuffer
) to the kernel that the kernel can
either read or write. The kernel calls this method only after it checks
that the entire buffer is within memory the process can both read and
write. Read moreAuto Trait Implementations§
impl<const NUM_PROCS: u8> Freeze for IPC<NUM_PROCS>
impl<const NUM_PROCS: u8> !RefUnwindSafe for IPC<NUM_PROCS>
impl<const NUM_PROCS: u8> !Send for IPC<NUM_PROCS>
impl<const NUM_PROCS: u8> !Sync for IPC<NUM_PROCS>
impl<const NUM_PROCS: u8> Unpin for IPC<NUM_PROCS>
impl<const NUM_PROCS: u8> !UnwindSafe for IPC<NUM_PROCS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more