Files | |
file | intr.c |
Interrupt management. | |
Functions | |
int | xnintr_init (xnintr_t *intr, unsigned irq, int priority, xnisr_t isr, xnist_t ist, 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. |
|
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/IST handlers.
Context: This routine must be called on behalf of a thread or IST context. |
|
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 or IST context. |
|
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/IST handlers, 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 or IST context. |
|
Initialize an interrupt object. The nanokernel defines a threaded interrupt model in order to:
Xenomai's nanokernel exhibits a split interrupt handling scheme separated into two parts. The first part is known as the Interrupt Service Routine (ISR), the second is the Interrupt Service Tasklet (IST). When an interrupt occurs, the ISR is fired in order to deal with the hardware event as fast as possible, without any interaction with the nanokernel. If the interrupt service code needs to reenter the nanokernel, the ISR may require an associated interrupt service tasklet to be scheduled immediately upon return. The IST has a lightweight thread context that allows it to invoke all nanokernel services safely. A Xenomai interrupt object may be associated with an ISR and/or an IST to process each IRQ event. [WARNING] Interrupt service threads/tasklets are deprecated in newer versions of the Xenomai nucleus, basically due to design and performance issues. Do not use the IST facility if you plan to port to RTAI/fusion. Upon receipt of an IRQ, the ISR/IST invocation policy is as follows:
If an ISR has been defined, the following bits are checked from its return value:
Context: This routine must be called on behalf of a thread context. |