pub struct GrantKernelData<'a> { /* private fields */ }
Expand description

This GrantKernelData object provides a handle to access upcalls and process buffers stored on behalf of a particular grant/driver.

Capsules gain access to a GrantKernelData object by calling Grant::enter(). From there, they can schedule upcalls or access process buffers.

It is expected that this type will only exist as a short-lived stack allocation, so its size is not a significant concern.

Implementations

Schedule the specified upcall for the process with r0, r1, r2 as provided values.

Capsules call this function to schedule upcalls, and upcalls are identified by the subscribe_num, which must match the subscribe number used when the upcall was originally subscribed by a process. subscribe_nums are indexed starting at zero.

Returns a lifetime limited reference to the requested ReadOnlyProcessBuffer.

The ReadOnlyProcessBuffer is only valid for as long as this object is valid, i.e. the lifetime of the app enter closure.

If the specified allow number is invalid, then a AddressOutOfBounds will be returned. This returns a process::Error to allow for easy chaining of this function with the ReadOnlyProcessBuffer::enter function with and_then.

Returns a lifetime limited reference to the requested ReadWriteProcessBuffer.

The ReadWriteProcessBuffer is only value for as long as this object is valid, i.e. the lifetime of the app enter closure.

If the specified allow number is invalid, then a AddressOutOfBounds will be return. This returns a process::Error to allow for easy chaining of this function with the ReadWriteProcessBuffer::enter() function with and_then.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.