Files | |
file | intr.c |
Interrupt management. | |
Functions | |
int | xnintr_init (xnintr_t *intr, unsigned irq, xnisr_t isr, xnflags_t flags) |
Initialize an interrupt object. | |
int | xnintr_destroy (xnintr_t *intr) |
Destroy an interrupt object. | |
int | xnintr_attach (xnintr_t *intr, void *cookie) |
Attach an interrupt object. | |
int | xnintr_detach (xnintr_t *intr) |
Detach an interrupt object. | |
int | xnintr_enable (xnintr_t *intr) |
Enable an interrupt object. | |
int | xnintr_disable (xnintr_t *intr) |
Disable an interrupt object. |
|
Attach an interrupt object. Attach an interrupt object previously initialized by xnintr_init(). After this operation is completed, all IRQs received from the corresponding interrupt channel are directed to the object's ISR.
Context: This routine must be called on behalf of a thread. |
|
Destroy an interrupt object. Destroys an interrupt object previously initialized by xnintr_init(). The interrupt object is automatically detached by a call to xnintr_detach(). No more IRQs will be dispatched by this object after this service has returned.
Context: This routine must be called on behalf of a thread. |
|
Detach an interrupt object. Detach an interrupt object previously attached by xnintr_attach(). After this operation is completed, no more IRQs are directed to the object's ISR, but the interrupt object itself remains valid. A detached interrupt object can be attached again by a subsequent call to xnintr_attach().
Context: This routine must be called on behalf of a thread. |
|
Disable an interrupt object. Disables the hardware interrupt line associated with an interrupt object. This operation invalidates further interrupt requests from the given source until the IRQ line is re-enabled anew.
Context: This routine must be called on behalf of a thread. |
|
Enable an interrupt object. Enables the hardware interrupt line associated with an interrupt object. Over real-time control layers which mask and acknowledge IRQs, this operation is necessary to revalidate the interrupt channel so that more interrupts can be notified.
Context: This routine must be called on behalf of a thread. |
|
Initialize an interrupt object. Associates an interrupt object with an IRQ line. When an interrupt occurs from the given irq line, the ISR is fired in order to deal with the hardware event. The interrupt service code may call any non-suspensive service from the nucleus. Upon receipt of an IRQ, the ISR is immediately called on behalf of the interrupted stack context. The status value returned by the ISR is then checked for the following bits:
Context: This routine must be called on behalf of a thread. |