Trait kernel::platform::ContextSwitchCallback

source ·
pub trait ContextSwitchCallback {
    // Required method
    fn context_switch_hook(&self, process: &dyn Process);
}
Expand description

Trait for implementing handlers on userspace context switches.

Required Methods§

source

fn context_switch_hook(&self, process: &dyn Process)

This function is called before the kernel switches to a process.

process is the app that is about to run

Implementations on Foreign Types§

source§

impl ContextSwitchCallback for ()

Implement default ContextSwitchCallback trait for unit.

source§

fn context_switch_hook(&self, _process: &dyn Process)

Implementors§