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: Attributes to local varables of class


hi Nick,

> I added these annotations some time ago to support a platform that
> had a very steep timing difference between a very small CPU-local RAM
> area and the main part of RAM. The idea was to move some critical
> static data into the local RAM for better performance.
which of the architecture under packages/hal/ it is? 

> It looks like you have found a place where I was being a little too
> enthusiatic with adding the annotations. They are indeed not necessary
> on dsr_count and next_dsr. However, the annotations have no effect in
> this case.
may be unintended things can be removed from the code, to avoid unnecessary
confusions.

While looking at the same code, another doubt popped off in my head.
dsr_list is a static array of size NumCPUs and the variables dsr_list and
dsr_count are local to the Cyg_Interrupt class.
Now this could mean that two different objects might have two different values
for these local variables and both might be accessing/modifying/updating the
same dsr_list?
Quite confusing! Has it been a problem some user so far might have pointed it
out, but no one seems to have. That means somehow things are working right!
To answer this confusion, I navigated the sources and found - 
eCos is creating only NumCPUs objects of type Cyg_Interrupt in the form of
cyg_sched_cpu_interrupt array in sched.cxx. Are these the only instances of
Cyg_Interrupt class?
What if some user adds one more of Cyg_Interrupt object? manipulation of
dsr_list via dsr_count and next_dsr can go for a toss??

If the answer out of above confusion is -- never should there be more than
NumCPUs instances of class Cyg_Interrupt -- then why do we need to make
dsr_list as an array and that too as static?

regards
brij
 



__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

-- 
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]