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: Stack access violations in eCos


> Yes, you're absolutely right. However I think the patch needs one little 
> improvement: for thread stacks, we should use CYGBLD_ATTRIB_ALIGNED like 
> you say (but ATTRIB not ANNOTATE for consistency with other names in 
> cyg_type.h).
> 
> However this patch deals with more than thread stacks, although that's the 
> main bit. It also does e.g. thread objects, in which case we should use a 
> different macro, like say:
> 
> #define CYGBLD_ATTRIB_ALIGNOFTYPE( _type_ ) \ 
> __attribute__((aligned(__alignof__( _type_ ))))
> 
> And I certainly know it's a pain, but we'd need ChangeLog entries for 
> these, although it's worth using a script to do this, e.g.
> 
> for i in `cat filelist` ; do
>    CL=`echo $i | sed 's at current/ dot * at current/ChangeLog at g'`
>    sed "s at FILE@${i} at g" < /tmp/myentry > /tmp/myentry.tmp
>    cat /tmp/myentry.tmp $CL > $CL.new
>    mv $CL.new $CL
> done
> 
> for some appropriate files "filelist" and "/tmp/myentry", e.g.
> 
> 2003-03-19  Larice Robert  <larice at vidisys dot de>
> 
> 	* FILE: Add alignments where required.
> 
> 
> Finally, don't use a #warning for calmrisc32 just because you aren't sure.
> 
> With that, I can apply your patch! And thanks for looking into all this 
> and spending the time!

Hello Jifl,

nice amount of work which you are shifting to me.

do you have a propose for CYGBLD_ATTRIB_ALIGN ?

garry once noted:
  #define CYGBLD_ATTRIB_ALIGN(__align__) __attribute__((aligned(__align__)))
i'd like to have an __attribute__((aligned)) for stacks though.
thats a special case for gcc, where gcc will itself deside how much alignement
is reasonable for the current machine architecture.
though gcc accepts __attribute__((aligned())) as well, the macro doesnt
accept an empty argument.

do you have some beautiful idea how to solve this ?

Robert Larice

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