Lines Matching full:handler

19 /// The value that can be returned from a [`Handler`] or a [`ThreadedHandler`].
29 /// Callbacks for an IRQ handler.
30 pub trait Handler: Sync + 'static {
31 /// The hard IRQ handler.
37 /// interrupt context, should be deferred to a threaded handler.
42 impl<T: ?Sized + Handler + Send> Handler for Arc<T> {
48 impl<T: ?Sized + Handler, A: Allocator + 'static> Handler for Box<T, A> {
85 // i.e.: at no point will &self be invalid while the handler is running.
125 /// A registration of an IRQ handler for a given IRQ line.
131 /// handler and process context. [`Completion`] uses interior mutability, so the
132 /// handler can signal with [`Completion::complete_all()`] and the process
154 /// impl irq::Handler for Data {
162 /// // Registers an IRQ handler for the given IrqRequest.
166 /// handler: impl PinInit<Data, Error>,
169 /// let registration = Registration::new(request, Flags::SHARED, c"my_device", handler);
173 /// registration.handler().completion.wait_for_completion();
182 /// * We own an irq handler whose cookie is a pointer to `Self`.
184 pub struct Registration<T: Handler> {
189 handler: T,
197 impl<T: Handler> Registration<T> {
198 /// Registers the IRQ handler with the system for the given IRQ number.
203 handler: impl PinInit<T, Error> + 'a,
206 handler <- handler,
238 /// Returns a reference to the handler that was registered with the system.
239 pub fn handler(&self) -> &T {
240 &self.handler
263 unsafe extern "C" fn handle_irq_callback<T: Handler>(_irq: i32, ptr: *mut c_void) -> c_uint {
270 T::handle(&registration.handler, device) as c_uint
282 /// The handler wants the handler thread to wake up.
286 /// Callbacks for a threaded IRQ handler.
288 /// The hard IRQ handler.
293 /// handler, i.e. [`ThreadedHandler::handle_threaded`].
301 /// The threaded IRQ handler.
328 /// A registration of a threaded IRQ handler for a given IRQ line.
333 /// The thread handler is only called if the IRQ handler returns
373 /// // Registers a threaded IRQ handler for the given [`IrqRequest`].
378 /// handler: impl PinInit<Data, Error>,
382 /// ThreadedRegistration::new(request, Flags::SHARED, c"my_device", handler);
388 /// let mut data = registration.handler().value.lock();
399 /// * We own an irq handler whose cookie is a pointer to `Self`.
406 handler: T,
415 /// Registers the IRQ handler with the system for the given IRQ number.
420 handler: impl PinInit<T, Error> + 'a,
423 handler <- handler,
456 /// Returns a reference to the handler that was registered with the system.
457 pub fn handler(&self) -> &T {
458 &self.handler
491 T::handle(&registration.handler, device) as c_uint
504 T::handle_threaded(&registration.handler, device) as c_uint