This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ECOS] Does eCos supports chained interrupt?


hello Zi,

> check if the interrupt is for it to process. My intention is > not to chain
all the interrupt vectors together,
> but to chain the ISRs for the 3 PCI devices( assuming each
> PCI device has different ISR),
> I want to be able to activate ISRs for the 3 PCI devices one
> after another when interrupt for this INT line happens,
> each ISR will check if the interrupt is for itself to

two solutions could be possible here --
[1] you write an ISR for this INT line (say interrupt N) that in some way finds
out which of the PCI device caused the interrupt this time and call the
appropriate subISR. you can either use an array of three
function-pointers-to-jump-to this subISR OR a code like
if (first-device) then subISR1
elseif (second-device) then subISR2
elseif (third-device) then subISR3
else Kaaabooommm.. (you never expect to come here)

[2] The main isr routine for interrupt N just calls the routines subISR1/2/3 in
desired order one after another and in this case each of the subISR checks if
the associated device interrupted or not and takes appropriate actions.

In both the cases - subISR shouldn't mark the interrupt handled. This is the job
to be done by main ISR for interrupt N.

sandeep



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]