This is the mail archive of the ecos-discuss@sourceware.cygnus.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]

HAL_THREAD_INIT_CONTEXT


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.


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