[][src]Trait sunrise_libuser::ldr::ILoaderInterfaceAsync

pub trait ILoaderInterfaceAsync {
    fn create_title<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        title_name: &'a [u8],
        args: &'a [u8],
        env: &'a [u8]
    ) -> FutureObj<'a, Result<u64, Error>>;
fn launch_title<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        pid: u64
    ) -> FutureObj<'a, Result<(), Error>>;
fn wait<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        pid: u64
    ) -> FutureObj<'a, Result<u32, Error>>;
fn get_name<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        pid: u64,
        title_name: &'a mut [u8]
    ) -> FutureObj<'a, Result<u64, Error>>;
fn kill<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        pid: u64
    ) -> FutureObj<'a, Result<(), Error>>;
fn get_state<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        pid: u64
    ) -> FutureObj<'a, Result<u8, Error>>;
fn get_process_state_changed_event<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>
    ) -> FutureObj<'a, Result<HandleRef<'static>, Error>>; fn dispatch<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        cmdid: u32,
        buf: &'a mut [u8]
    ) -> FutureObj<Result<(), Error>> { ... } }

A mishmash of Nintendo's loader and pm in a single disgusting service.

Responsible for creating, loading, starting and waiting on processes.

Required methods

fn create_title<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    title_name: &'a [u8],
    args: &'a [u8],
    env: &'a [u8]
) -> FutureObj<'a, Result<u64, Error>>

Create and load the process title_name with the given args and env. Returns the process' pid. The process will not be started yet, use launch_title to start it.

The args given is a cmdline string that will be passed verbatim to the subprocess. The environment should be a \0-delimited array of environment variables.

fn launch_title<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    pid: u64
) -> FutureObj<'a, Result<(), Error>>

Starts a process created with create_title.

fn wait<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    pid: u64
) -> FutureObj<'a, Result<u32, Error>>

Wait for the process with the given pid, returning the exit status.

fn get_name<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    pid: u64,
    title_name: &'a mut [u8]
) -> FutureObj<'a, Result<u64, Error>>

Get process name.

fn kill<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    pid: u64
) -> FutureObj<'a, Result<(), Error>>

Wait for the process with the given pid, returning the exit status.

fn get_state<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    pid: u64
) -> FutureObj<'a, Result<u8, Error>>

Gets the state of the provided pid

fn get_process_state_changed_event<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>
) -> FutureObj<'a, Result<HandleRef<'static>, Error>>

Get an event that gets signaled whenever a process changes state.

Loading content...

Provided methods

fn dispatch<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    cmdid: u32,
    buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>

Handle an incoming IPC request.

Loading content...

Implementors

Loading content...