The last parameter, flags, controls all kinds of things:
- _NTO_INTR_FLAGS_END
- Indicates that this handler should go after other handlers that may
be attached to the same interrupt source.
- _NTO_INTR_FLAGS_NO_UNMASK
- (QNX Neutrino 6.6 or later)
Indicates that the kernel should leave the interrupt masked.
Normally, InterruptAttach() and InterruptAttachEvent() automatically
unmask an interrupt the first time something is attached to it.
If you specify _NTO_INTR_FLAGS_NO_UNMASK, the kernel leaves the interrupt masked, and you
must specifically call
InterruptUnmask()
to enable it.
- _NTO_INTR_FLAGS_PROCESS
- Indicates that this handler is associated with the process rather than the thread.
What this boils down to is that if you specify this flag, the interrupt handler
will be automatically dissociated from the interrupt source when the process exits.
If you don't specify this flag, the interrupt handler will be dissociated from the
interrupt source when the thread that created the association in the first place
exits.
- _NTO_INTR_FLAGS_TRK_MSK
- Indicates that the kernel should track the number of times the interrupt has been masked.
This causes a little more work for the kernel, but is required to ensure an orderly
unmasking of the interrupt source should the process or thread exit.
- _NTO_INTR_FLAGS_EXCLUSIVE
- (QNX Neutrino 7.0.4 or later)
Indicates that the interrupt handler or event currently attached to the interrupt vector
is the only one that can be attached.