Writing Device Drivers
Previous Next

Interrupt Functions

The interrupt functions are:

ddi_intr_add_handler(9F)

Adds an interrupt handler.

ddi_intr_add_softint(9F)

Adds a soft interrupt handler.

ddi_intr_alloc(9F)

Allocates system resources and interrupt vectors for the specified type of interrupt.

ddi_intr_block_disable(9F)

Disables the specified range of interrupts. For MSI only.

ddi_intr_block_enable(9F)

Enables the specified range of interrupts. For MSI only.

ddi_intr_clr_mask(9F)

Clears an interrupt mask if the specified interrupt is enabled.

ddi_intr_disable(9F)

Disables the specified interrupt.

ddi_intr_dup_handler(9F)

Use with MSI-X only. Copies an address and data pair for an allocated interrupt vector to an unused interrupt vector on the same device.

ddi_intr_enable(9F)

Enables the specified interrupt.

ddi_intr_free(9F)

Releases the system resources and interrupt vectors for a specified interrupt handle.

ddi_intr_get_cap(9F)

Returns interrupt capability flags for the specified interrupt.

ddi_intr_get_hilevel_pri(9F)

Returns the minimum priority level for a high-level interrupt.

ddi_intr_get_navail(9F)

Returns the number of interrupts available for a particular hardware device and given interrupt type.

ddi_intr_get_nintrs(9F)

Get the number of interrupts that the device supports for the given interrupt type.

ddi_intr_get_pending(9F)

Read the interrupt pending bit if one is supported by either the host bridge or the device.

ddi_intr_get_pri(9F)

Returns the current software priority setting for the specified interrupt.

ddi_intr_get_softint_pri(9F)

Returns the soft interrupt priority for the specified interrupt.

ddi_intr_get_supported_types(9F)

Returns the hardware interrupt types that are supported by both the device and the host.

ddi_intr_remove_handler(9F)

Removes the specified interrupt handler.

ddi_intr_remove_softint(9F)

Remove the specified soft interrupt handler.

ddi_intr_set_cap(9F)

Sets the DDI_INTR_FLAG_LEVEL or DDI_INTR_FLAG_EDGE flag for the specified interrupt.

ddi_intr_set_mask(9F)

Sets an interrupt mask if the specified interrupt is enabled.

ddi_intr_set_pri(9F)

Sets the interrupt priority level for the specified interrupt.

ddi_intr_set_softint_pri(9F)

Changes the relative soft interrupt priority for the specified soft interrupt.

ddi_intr_trigger_softint(9F)

Trigger the specified soft interrupt.

To take advantage of the features of the new framework, use the above interfaces. Do not use the deprecated interfaces that are listed in the following table. These deprecated interfaces are retained for compatibility purposes only.

Table B-3 Deprecated Interrupt Functions

Deprecated Interrupt Functions

Replacements

ddi_add_intr(9F)

Three-step process:

  1. ddi_intr_alloc(9F)

  2. ddi_intr_add_handler(9F)

  3. ddi_intr_enable(9F)

ddi_add_softintr(9F)

ddi_intr_add_softint(9F)

ddi_dev_nintrs(9F)

ddi_intr_get_nintrs(9F)

ddi_get_iblock_cookie(9F)

Three-step process:

  1. ddi_intr_alloc(9F)

  2. ddi_intr_get_pri(9F)

  3. ddi_intr_free(9F)

ddi_get_soft_iblock_cookie(9F)

Three-step process:

  1. ddi_intr_add_softint(9F)

  2. ddi_intr_get_softint_pri(9F)

  3. ddi_intr_remove_softint(9F)

ddi_intr_hilevel(9F)

Three-step process:

  1. ddi_intr_alloc(9F)

  2. ddi_intr_get_hilevel_pri(9F)

  3. ddi_intr_free(9F)

ddi_remove_intr(9F)

Three-step process:

  1. ddi_intr_disable(9F)

  2. ddi_intr_remove_handler(9F)

  3. ddi_intr_free(9F)

ddi_remove_softintr(9F)

ddi_intr_remove_softint(9F)

ddi_trigger_softintr(9F)

ddi_intr_trigger_softint(9F)

Previous Next