hwitag_find_ivec()

QNX SDP8.0C Library ReferenceAPIDeveloper

Find the interrupt vector associated with a device

Synopsis:

#include <drvr/hwinfo.h>

unsigned hwitag_find_ivec( unsigned hwi_off,
                           unsigned *irq );

Arguments:

hwi_off
The offset into the hwinfo section of the system page for the device, which you can get by calling hwi_find_device().
irq
A pointer to a location that specifies the index of interrupt vector; see below.

Library:

libdrvr

Use the -l drvr option to qcc to link against this library.

Description:

You can use hwitag_find_ivec() to find one or more interrupt vectors associated with the device at hwi_off in the hwinfo section of the system page. You can get the hwi_off parameter by calling hwi_find_device().

Some devices contain multiple interrupt vectors. You can retrieve all of them by using the ivec_idx parameter as follows:

  • On the first call, set *ivec_idx to 0. The first vector (if one exists) is returned. You can then continue to call hwitag_find_ivec() with the same arguments until HWI_ILLEGAL_VECTOR is returned.
  • If you know that there's more than one interrupt vector for the specified device, you can set *ivec_idx to the number of the desired interrupt. If that interrupt exists, the vector is returned. For example, to obtain the third interrupt for hwi_off, set *ivec_idx to 2 (base-0 indexing applies).
  • If you're interested only in the first vector, you can pass NULL for ivec_idx (which is the same as setting *ivec_idx to 0).

Returns:

The interrupt vector, or HWI_ILLEGAL_VECTOR if the vector isn't found.

Classification:

QNX OS

Safety:
Cancellation pointNo
Signal handlerNo
ThreadYes
Page updated: