This is the mail archive of the ecos-discuss@sources.redhat.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]
Other format: [Raw text]

Re: Inheriting from Cyg_Thread...


"Tony Butt" <tjb@cea.com.au> writes:

> Hi,
> 
> Does anyone have any thoughts on the viability of creating a new Thread
> class which inherits from the Cyg_Thread class, and adds extra functionality
> - eg queueing any malloc'ed memory for
> processing by a garbage collector when the destructor is called.
> 
> I've done it, it seems to work without breaking anything (especially the
> scheduler...).

The kernel classes were not really designed with the idea that further
classes would inherit from them. However, as you have noticed, it
should work.

One caveat: The external interfaces of all the kernel classes are not
guaranteed to remain unchanged. We may make changes to various member
functions and fields to accomodate new features. Now, we haven't done
this very often, and usually the changes are backwards compatible. But
we cannot guarantee that it won't happen again, or that the next
change won't break your derived class in some way. So long as you
understand that, feel free to use the sources any way you want.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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