Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/input/api/devi_register_interrupt.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/input/api/devi_register_interrupt.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/input/api/devi_register_interrupt.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/input/api/devi_register_interrupt.html on line 8
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:
- intr
- Interrupt number (IRQ) you're going to register.
- prio
- Dispatch priority that will be assigned to the callback
function that processes a pulse. The priority is generated
by an interrupt handler.
- pc
- Pulse code. If the pc argument isn't NULL and
isn't equal to DEVI_PULSE_ALLOC, then it will
be used as the pulse code to associate the
pulse() callback.
- module
- Name of module data block.
- evp
- Pointer to sigevent structure. If
provided, evp is attached to the interrupt (see
InterruptAttachEvent()
in the QNX Neutrino Library Reference.)
If evp is NULL, a pulse will be allocated and the
module's pulse() callback will be associated with
it.
- flags
- Can be 0 or DEVI_SHARE_RSRC. If the
flags argument is set to
DEVI_SHARE_RSRC, this will tell the resource
database manager to allow this interrupt to be shared. If
the pc parameter wasn't NULL, then the allocated
pulse code will be returned in it.
A valid interrupt ID, or -1 on error.
QNX
Safety: | |
Interrupt handler |
Not applicable |
Signal handler |
Not applicable |
Thread |
Not applicable |
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/input/api/devi_register_interrupt.html on line 135
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/input/api/devi_register_interrupt.html on line 135