Skip to contentSkip to conversation

Propagating interrupts

Xenomai-help Jeff Webb 2 participants 2 messages Nov 1, 2006 – Nov 2, 2006

lore
Share & tools
lore

Jeff Webb

author
#0 lore raw

I have read that propagating interrupts to Linux is a bad idea for RT applications. I am trying to understand what happens when I install an interrupt handler via the userspace POSIX skin like this:

pthread_intr_attach_np (&ctr_intr, irq_number, PTHREAD_IPROPAGATE);

My RT thread waits on this interrupt using:

pthread_intr_wait_np(ctr_intr, NULL);

Here is my understanding of what happens when I get an interrupt on this IRQ. The Xenomai interrupt handler is executed, which wakes up my RT thread. The interrupt remains masked until the Linux interrupt handler is executed. The linux interrupt handler processes the interrupt, and then re-enables the IRQ. Now the RT thread can receive more interrupts.

Is this basically correct?

-Jeff

#1 lore raw
Quoted 11 lines · Jeff Webb

I have read that propagating interrupts to Linux is a bad idea for RT applications. I am trying to understand what happens when I install an interrupt handler via the userspace POSIX skin like this:

pthread_intr_attach_np (&ctr_intr, irq_number, PTHREAD_IPROPAGATE);

My RT thread waits on this interrupt using:

pthread_intr_wait_np(ctr_intr, NULL);

Quoted 7 lines

Here is my understanding of what happens when I get an interrupt on this IRQ. The Xenomai interrupt handler is executed, which wakes up my RT thread. The interrupt remains masked until the Linux interrupt handler is executed. The linux interrupt handler processes the interrupt, and then re-enables the IRQ. Now the RT thread can receive more interrupts.

Is this basically correct?

Yes, the Linux domain can cause priority inversion /wrt the real-time domain trying to handle the same IRQ line. That's true for any deterministic/indeterministic IRQ handler combination, not only under Xenomai.

Jan