[ECOS] HAL_THREAD_INIT_CONTEXT

Sergei Organov osv@javad.ru
Tue Apr 18 09:49:00 GMT 2000


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.



More information about the Ecos-discuss mailing list