This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Wrong declaration of idle_thread_stack
- From: "Uwe Kindler" <ukindler at htwm dot de>
- Cc: <ecos-patches at sources dot redhat dot com>
- Date: Wed, 21 Jan 2004 16:09:01 +0100
- Subject: 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