[ECOS] Attributes to local varables of class

Nick Garnett nickg@ecoscentric.com
Tue May 13 17:07:00 GMT 2003

Brij Bihari Pandey <fuzzhead012@yahoo.com> writes:

> hi,
> In "packages/kernel/current/include/intr.hxx", class
> Cyg_Interrupt, this small section puzzles me --
> -----------------------------------------------------
> // Number of DSR posts made
> volatile cyg_ucount32 dsr_count
> // next DSR in list
> Cyg_Interrupt* volatile next_dsr
> // static list of pending DSRs
> static Cyg_Interrupt* volatile
> #endif
> --------------------------------------------------
> I am puzzled about - if this code functions then it
> allows me to have data local to a class object,
> sitting somewhere outside the object. As far as my
> simple knowledge about c++ goes. it can't be possible.
> Is attribute specification with local members
> dsr_count  and next_dsr something that has somehow got
> ignored
> OR
> these variables were also intended to be static like
> dsr_list
> hope that someone can clear this puzzle.
> thanks
> brij

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.

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.

Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

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

More information about the Ecos-discuss mailing list