This is the mail archive of the ecos-patches@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]

Wrong declaration of idle_thread_stack


Hello,

if stack checking is enabled (CYGFUN_KERNEL_THREADS_STACK_CHECKING ) then
Cyg_HardwareThread::attach_stack expects a CYG_WORD aligned stack - at least
the following assertions will be executed:

CYG_ASSERT( NULL != base, "stack base non-NULL" );
CYG_ASSERT( 0 == ((sizeof(CYG_WORD)-1) & (cyg_uint32)base), "stack base
alignment" );
CYG_ASSERT( 0 == ((sizeof(CYG_WORD)-1) & (cyg_uint32)top),  "stack  top
alignment" );

As far as I understand the code above, the assertions expect a CYG_WORD
alignet stack top and stack base. The idle_thread_stack is declared as
static char at the moment. So this is my question: What will happen if the
idle_thread_stack is aligned to an odd address? In my opinion the assertions
will fail (and they already did).

I already posted 2 questions about this problem in the discussion list and 1
patch for idle_thread_stack declaration in the patch-mailinglist without
receiving any answer - so there must be a simple solution for this problem
or I must be wrong - please tell me why.

Thank you very much

Regards, Uwe

eCos port for Renesas EDOSK-2674
http://www.htwm.de/ukindler/ecos


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