Skip to contentSkip to conversation

rt_intr_enable() requierd after rt_intr_create

Xenomai-core Ignacio García Pérez 2 participants 2 messages Nov 29, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I noticed that when an interrupt object is created using rt_intr_create(), it is created disabled, and a call to rt_intr_enable() is necessary for the ISR to be called.

Question is: is this the expected behaviour?. If so, I think this should be mentioned somewhere in the rt_intr_create documentation. In fact, from reading the docs one could infer the opposite.

On a related issue, I noticed that the rt_intr_enable() documentation says:

"Enables the hardware interrupt line associated with an interrupt object. Over Adeos-based systems which mask and acknowledge IRQs upon receipt, this operation is necessary to revalidate the interrupt channel so that more interrupts from the same source can be notified."

Is this correct?. I ask because the rt_intr_create() documentation tells you to just return RT_INTR_ENABLE from the ISR if you want this. It's confusing.

Nacho.

#1 lore raw
Quoted 7 lines · Ignacio García Pérez

Hi,

I noticed that when an interrupt object is created using rt_intr_create(), it is created disabled, and a call to rt_intr_enable() is necessary for the ISR to be called.

Question is: is this the expected behaviour?.

Yes. You don't necessarily want to take interrupts immediately after the object is created, for which you might have some additional housekeeping chores to perform before that.

If so, I think this should

Quoted 3 lines

be mentioned somewhere in the rt_intr_create documentation. In fact, from reading the docs one could infer the opposite.

Ok, will add a note to rt_int_create().

Quoted 11 lines

On a related issue, I noticed that the rt_intr_enable() documentation says:

"Enables the hardware interrupt line associated with an interrupt object. Over Adeos-based systems which mask and acknowledge IRQs upon receipt, this operation is necessary to revalidate the interrupt channel so that more interrupts from the same source can be notified."

Is this correct?. I ask because the rt_intr_create() documentation tells you to just return RT_INTR_ENABLE from the ISR if you want this. It's confusing.

Well, the text seems pretty clear to me here: rt_intr_enable() specifies that the re-enabling _operation_ should be carried on after IRQ receipt, but not necessarily using rt_intr_enable(). Returning RT_INTR_ENABLE from the ISR is just the other way to do this.

Quoted 8 lines

Nacho.

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Signature · 1 line
Philippe.