pub trait ThreadedHandler: Sync {
// Required method
fn handle_threaded(&self, device: &Device<Bound>) -> IrqReturn;
// Provided method
fn handle(&self, device: &Device<Bound>) -> ThreadedIrqReturn { ... }
}
Expand description
Callbacks for a threaded IRQ handler.
Required Methods§
Sourcefn handle_threaded(&self, device: &Device<Bound>) -> IrqReturn
fn handle_threaded(&self, device: &Device<Bound>) -> IrqReturn
The threaded IRQ handler.
This is executed in process context. The kernel creates a dedicated
kthread
for this purpose.
Provided Methods§
Sourcefn handle(&self, device: &Device<Bound>) -> ThreadedIrqReturn
fn handle(&self, device: &Device<Bound>) -> ThreadedIrqReturn
The hard IRQ handler.
This is executed in interrupt context, hence all corresponding
limitations do apply. All work that does not necessarily need to be
executed from interrupt context, should be deferred to the threaded
handler, i.e. ThreadedHandler::handle_threaded
.
The default implementation returns ThreadedIrqReturn::WakeThread
.