This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: some problems with thread.hxx
- From: Bart Veer <bartv at ecoscentric dot com>
- To: jifl at eCosCentric dot com
- Cc: lhbyron at hotmail dot com, ecos-discuss at sources dot redhat dot com
- Date: Tue, 5 Nov 2002 11:03:56 +0000 (GMT)
- Subject: Re: [ECOS] some problems with thread.hxx
- References: <F1250PrSz6L2cX6J1pG0001b82c@hotmail.com> <3DC74D51.7060807@eCosCentric.com>
>>>>> "Jifl" == Jonathan Larmour <jifl@eCosCentric.com> writes:
Jifl> li hui wrote:
>> now I try to add some member variables in class Cyg_Thread. I add
>> following variables in the class and the eCos works smoothly.
>> private:
>> cyg_uint32 iPeriod; //Task period (10ms)
>> cyg_uint16 iQos; //Qos value (1,2,3)
>> cyg_uint16 iMissNum; //count task miss period
>> bool isPeriodEnd; // falg is true if task is over when
>> period is end
>>
>> but if I add anther several member variables, the eCos cna not
>> startup to jump into main function, or it jump into main
>> function and show me the segement fault warning in executing
>> the first sentence.It seems that I can only add three varibles
>> in class cyg_thread.
Jifl> That shouldn't happen. Perhaps some object has not been
Jifl> recompiled that should have been. Try a completely clean
Jifl> build after making these changes.
I suspect the problem is with kapidata.h. If the C++ class is extended
then the equivalent C data structure needs to be extended in the same
way, or the C++ kernel implementation will attempt to use more space
than is provided by the application in a cyg_thread data structure.
Incidentally, at a guess member variables like iPeriod and iQos belong
in a Cyg_SchedThread base class appropriate to the type of scheduler
you are working on. They are not generic fields applicable to all
threads.
Bart
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss