This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
HAL_THREAD_INIT_CONTEXT
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: [ECOS] HAL_THREAD_INIT_CONTEXT
- From: Sergei Organov <osv at javad dot ru>
- Date: 18 Apr 2000 20:49:10 +0400
Hello,
While developing FP support for the PowerPC hal I've got problem. The
HAL_THREAD_INIT_CONTEXT macro seems to have no way to know the size of
stack. This prevents me from allocating space for the FP context on the unused
side of the stack. The macro looks like this:
HAL_THREAD_INIT_CONTEXT( _sparg_, _thread_, _entry_, _id_ )
Unfortunately _thread_ argument isn't guaranteed to be pointer to the current
Cyg_Thread object by the documentation (while it's indeed used this way in the
kernel), and assuming this breaks hal/context.c test that passes just an
integer as the second argument to the macro.
Without knowing the stack size in the macro it is also unclear how to
implement hal for architecture where stack grows to the higher addresses.
Do you think the interface should be changed?
BR,
Sergei Organov.