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: Priority between different DSRs?


Hi Alex.

This is what I make of your queries. I'm a bit rusty so do correlate with the code.

On Mon, 2005-03-21 at 11:27 +0100, Alex Bueno Guarner wrote:

> So the fact is that I have to process both in the DSRs. Is there any way 
> to give priority to the DSRs?

No. However, DSRs are intimately associated with ISRs which, as you
already may know, have a specifiable priority.

>  Also, I know that the DSRs are processed 
> after ISRs and before returning to the threads, but, in which order?

When an ISR has finished what it was written for, it posts a DSR if
needed. This post action is appended to a list. So the order is decided
right here since when the DSRs are executed, this list is iterated
through and all the registered DSR routines are called as present in
this list.

>  If I 
> am processing a DSR and and interrupt occurs, the new DSR is processed 
> finishing the first one?

Like I've said, the new ISR will occur and will post the associated DSR
which will be appended to a pending list of DSRs. If no further
interrupts have occurred, code flow will eventually return to the
originally interrupted DSR and after this DSR has finished its job, the
next one in the list of pending DSRs will be called.

>  As I've seen, it seems that the DSR of the new 
> interrupt is executing BEFORE the first one finishes. Thus, i tseems that a 
> DSR not only can be interrupted by a ISR, but also the DSR associated with 
> it. Am I wrong?

I would think that you are wrong.

> 
> 	I've looked for more information about it, but I haven't found anything 
> about in which order the DSRs execute.

The code! :)

> P.D: Please, reply also to my address, because I don't check too much the 
> mailing list.

Wish you did though! From experience, this is a great place for thrashing such doubts.

Cheers,
Robin



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


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