sel4_microkit

Trait Handler

Source
pub trait Handler {
    type Error: Display;

    // Provided methods
    fn notified(&mut self, channel: Channel) -> Result<(), Self::Error> { ... }
    fn protected(
        &mut self,
        channel: Channel,
        msg_info: MessageInfo,
    ) -> Result<MessageInfo, Self::Error> { ... }
    fn fault(
        &mut self,
        child: Child,
        msg_info: MessageInfo,
    ) -> Result<Option<MessageInfo>, Self::Error> { ... }
    fn take_deferred_action(&mut self) -> Option<DeferredAction> { ... }
}
Expand description

Trait for the application-specific part of a protection domain’s main loop.

Required Associated Types§

Source

type Error: Display

Error type returned by this protection domain’s entrypoints.

Provided Methods§

Source

fn notified(&mut self, channel: Channel) -> Result<(), Self::Error>

This method has the same meaning and type as its analog in libmicrokit.

The default implementation just panics.

Source

fn protected( &mut self, channel: Channel, msg_info: MessageInfo, ) -> Result<MessageInfo, Self::Error>

This method has the same meaning and type as its analog in libmicrokit.

The default implementation just panics.

Source

fn fault( &mut self, child: Child, msg_info: MessageInfo, ) -> Result<Option<MessageInfo>, Self::Error>

This method has the same meaning and type as its analog in libmicrokit.

The default implementation just panics.

Source

fn take_deferred_action(&mut self) -> Option<DeferredAction>

An advanced feature for use by protection domains which seek to coalesce syscalls when possible.

This method is used by the main loop to fuse a queued seL4_Send call with the next seL4_Recv using seL4_NBSendRecv. Its default implementation just returns None.

Implementors§