Skip to main content

async_bind_irq

Function async_bind_irq 

Source
pub unsafe extern "C" fn async_bind_irq(
    dispatcher: *mut async_dispatcher_t,
    irq: *mut async_irq_t,
) -> zx_status_t
Expand description

Begins asynchronously waiting on an IRQ specified in |irq|. Invokes the handler when the wait completes. The irq’s handler will be invoked once for each interrupt packet received, until the irq object is unbound with |async_unbind_irq| or the dispatcher is shut down. When the dispatcher is shutting down (being destroyed), if the irq has not been unbound, the handlers of all remaining irqs will be invoked with a status of |ZX_ERR_CANCELED|.

Returns |ZX_OK| if the wait was successfully begun. Returns |ZX_ERR_BAD_STATE| if the dispatcher is shutting down. Returns |ZX_ERR_NOT_SUPPORTED| if not supported by the dispatcher.

This operation is thread-safe.