build_mux_command_device_read_irq()
QNX SDP8.0PCI Server User's GuideAPIConfiguration
Build a command to read interrupt requests
Synopsis:
#include <pci/pci_mux.h>
int build_mux_command_device_read_irq( req_read_irq_t *req,
pcimux_devhdl_t hdl,
int_t nirq );
Arguments:
- req
- A pointer to a req_read_irq_t structure.
- hdl
- The connection handle from pci_mux_init().
- nirq
- The number of IRQ values to read.
Library:
libpci
Use the -l pci option to qcc to link against this library.
Description:
The build_mux_command_device_read_irq() function builds a command for pci_mux_command() to send. The function then returns a response in the form of a reply_read_irq_t structure, which contains interrupt request (IRQ) information.
Returns:
A reply_read_irq_t structure, which includes the members listed below:
typedef struct reply_read_irq_ {
pci_mux_req_t hdr;
pcimux_err_t err;
int_t nirq;
pcimux_irq_t irqs[];
} reply_read_irq_t;
- hdr
- The header information for the reply structure.
- err
- An error code from pci_device_read_irq() or one of
the following:
- PCI_ERR_OK — Success.
- PCI_ERR_ENOMEM — Couldn't allocate an IRQ array of size requested by nirq.
- PCI_ERR_ENOENT — Failed to find a device based on hdl.
- nirq
- One of the following:
- If there aren't any interrupts currently associated with the device, pci-server attempts to allocate the requested nirq number of pin interrupts from the hardware module. If successful, err is set to PCI_ERR_OK, and the reply nirq is updated. Note that the number of IRQs allocated may be smaller or equal to the requested nirq. If unsuccessful, err reflects the hardware module specific return code, and all other fields become undefined.
- If the request nirq is larger than or equal to the number of IRQs associated with the device, then the reply nirq is the number of IRQs associated with the device. The reply irqs array will contain a number of elements equal to the request nirq.
- If the request nirq is smaller than the number of IRQs associated with the device, then the reply nirq will contain the two's complement of the number of IRQ's that weren't read. The reply irqs array will contain a number of elements equal to the request nirq.
- irqs
- An array of IRQ numbers associated with the device.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | No |
Thread | Yes |
Page updated: