Attach to an interrupt
int devi_register_interrupt( int intr, int prio, int *pc, input_module_t *module, struct sigevent *evp, unsigned flags );
This function lets you attach to an interrupt. The default method of attachment is to use InterruptAttachEvent() and send back a pulse when the IRQ triggers. But you can override this behavior by passing in your own event structure in the fifth parameter (evp).
For example if you wanted to spawn a separate interrupt-handling thread and process interrupts within it, you could set up the event structure to send back SIGEV_INTR.
The arguments are:
If evp is NULL, a pulse will be allocated and the module's pulse() callback will be associated with it.
A valid interrupt ID, or -1 on error.
QNX
Safety: | |
---|---|
Interrupt handler | Not applicable |
Signal handler | Not applicable |
Thread | Not applicable |