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: cyg_thread vs Cyg_Thread size mismatch


ok. i think i have found a fix, but not the root cause.
if you add __attribute__((packed)) to the Cyg_Alarm, cyg_alarm,
Cyg_ThreadTimer, cyg_threadtimer classes and structures, then the
sizes will match, and there is no longer an ASSERTION.  
looks like there is some strange (i.e. i don't understand)
padding going on with the default mips1/r3000 target.  The
padding seems to be different between the C++ classes and the c
structure definitions.  I do not understand the default gcc
padding for mips1/r3000 target, and sounds like i need to go to
the gcc list and ask around.  
Also, I wonder about all of the other kernel classes and
structure mappings and if there is only a padding issue, or if
there is also some sort of alignment variances that might occur.
If there are alignment defaults (jmps?, functions?, labels?,
loops?) then perhaps the sizes will vary depending upon where the
class or structure start location happens to land in memory.
FWIW, I used __attribute__((aligned)) for the above
structs/classes but didn't seem to see any difference in the
sizes.
thanks
tom

-----Original Message-----
From: Christoph Csebits [mailto:christoph.csebits@frequentis.com]
Sent: Tuesday, December 11, 2001 10:53 AM
To: Woller, Thomas
Cc: 'ecos-discuss@sources.redhat.com'
Subject: Re: [ECOS] cyg_thread vs Cyg_Thread size mismatch


Hi,

On Tue, Dec 11, 2001 at 10:14:47AM -0600, Woller, Thomas wrote:
> Greetings, I am experiencing the same problem (as the thread
> archive below Sept 5, 2001) with a structure size mismatch with
> the cyg_thread and the Cyg_Thread compare.  I checked into the
> archives and found a thread from Christoph with the same
problem,
> but i did not see any resolution in the archives.  

I didnt found a solution for this problem. Since we are changing
the platform it does not really bother me any longer. This is
surely
not what you want to hear.

Because no one expirienced the same problems i blamed it on my
selfmade port and stayed on the working snapshot. I am
still interested in a solution.

good luck
-- 


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