class IrqBase

Defined at line 24 of file ../../sdk/lib/async/include/lib/async/cpp/irq.h

Holds context for an irq and its handler, with RAII semantics.

Automatically unbinds the irq when it goes out of scope.

This class must only be used with single-threaded asynchronous dispatchers

and must only be accessed on the dispatch thread since it lacks internal

synchronization of its state.

Concrete implementations: |async::Irq|, |async::IrqMethod|.

Please do not create subclasses of IrqBase outside of this library.

Public Methods

zx_status_t Begin (async_dispatcher_t * dispatcher)

Begins asynchronously waiting for the object to receive one or more of

the trigger signals. Invokes the handler when the irq is triggered.

Returns |ZX_OK| if the irq 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.

Defined at line 24 of file ../../sdk/lib/async/irq.cc

zx_status_t Cancel ()

Cancels the irq.

If successful, the irq's handler will not run.

Returns |ZX_OK| if the irq was pending and it has been successfully

canceled; its handler will not run again and can be released immediately.

Returns |ZX_ERR_NOT_FOUND| if there was no pending irq either because it

already completed, or had not been started.

Returns |ZX_ERR_NOT_SUPPORTED| if not supported by the dispatcher.

Defined at line 36 of file ../../sdk/lib/async/irq.cc

zx_handle_t object ()

Gets or sets the interrupt object.

Defined at line 37 of file ../../sdk/lib/async/include/lib/async/cpp/irq.h

void set_object (zx_handle_t object)

Defined at line 38 of file ../../sdk/lib/async/include/lib/async/cpp/irq.h

Protected Methods

void IrqBase (zx_handle_t object, zx_signals_t trigger, uint32_t options, async_irq_handler_t * handler)

Defined at line 12 of file ../../sdk/lib/async/irq.cc

void ~IrqBase ()

Defined at line 16 of file ../../sdk/lib/async/irq.cc

void IrqBase (const IrqBase & )

Defined at line 30 of file ../../sdk/lib/async/include/lib/async/cpp/irq.h

void IrqBase (IrqBase && )

Defined at line 31 of file ../../sdk/lib/async/include/lib/async/cpp/irq.h

IrqBase & operator= (const IrqBase & )

Defined at line 32 of file ../../sdk/lib/async/include/lib/async/cpp/irq.h

IrqBase & operator= (IrqBase && )

Defined at line 33 of file ../../sdk/lib/async/include/lib/async/cpp/irq.h

template <typename T>
T * Dispatch (async_irq * irq, zx_status_t status)

Defined at line 61 of file ../../sdk/lib/async/include/lib/async/cpp/irq.h