Handling more than one interrupt with the same interrupt han

Hi,
I am currently developing a driver for a chip that implements two
(physical) interrupt lines, each connected to a different
Interrupt line in the CPU.
Therefore the most “natural” approach would be to write two independent
interrupt handling processes that will register and wait
for these interrupt events.

I would like, however, to combine these two processes into one. This process
will register for the two interrupt events and will wait on both events.
The processes will be woken up when one (or more) of these events occur,
will be able to realize the event that woke it up
ant act accordingly. ( is resembles the idea behind the “select” call).

Is there a way in QNX to do it ?

Thanks
Moti H.

motih <a@b.com> wrote:

Hi,
I am currently developing a driver for a chip that implements two
(physical) interrupt lines, each connected to a different
Interrupt line in the CPU.
Therefore the most “natural” approach would be to write two independent
interrupt handling processes that will register and wait
for these interrupt events.

I would like, however, to combine these two processes into one. This process
will register for the two interrupt events and will wait on both events.
The processes will be woken up when one (or more) of these events occur,
will be able to realize the event that woke it up
ant act accordingly. ( is resembles the idea behind the “select” call).

Is there a way in QNX to do it ?

Call InterruptAttach() or InterruptAttachEvent() twice in the process
that is handling both interrupts. This isn’t a problem, and isn’t
uncommon. (e.g. an eide driver on x86 that is handling both controllers
on interrupt 14 and 15 will attach a notification to both, or a serial
port driver handling COM1 and COM2 will have an interrupt handler attached
to both interupt 3 and interrupt 4.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com