This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Inheriting from Cyg_Thread...
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Tony Butt" <tjb at cea dot com dot au>
- Cc: <ecos-discuss at ecos dot sourceware dot org>
- Date: 18 May 2004 09:58:41 +0100
- Subject: Re: [ECOS] Inheriting from Cyg_Thread...
- References: <001c01c43c93$6253e1a0$270210ac@cea.com.au>
"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