This devic, allow user programs
to wait for interrupts to happpen simply by doing a blocking read()
or better still, a select()
on the opened device.
The mechanism is patterned after the one found in the RTC driver.
After opening the device a ioctl-call with VMEIRQ_SETLINK is needed
to attach the open file with a particular interrupt level and
interupt vector.
The file vme_io.h
defines the data structure for that call:
struct vme_irq_mapping_type { unsigned char level; unsigned char vector; };
read()
is done,
the data returned show the VMEBus interrupt vector,
and the number of interrupts that got lost since the last read.
To get this data,
vme_io.h
contains the following definition:
struct vme_irq_data_type { int nof_missed_interrupts; int vector_number; };