[En-Nut-Discussion] NutHeapRealloc
Ole Reinhardt
ole.reinhardt at embedded-it.de
Tue May 27 16:01:13 CEST 2008
Hi Morty,
> We did the same. See my posting form 2008-05-06 and the last from
> Thiago. I added quite a few new features, though (e.g. realloc).
> The problem with adding a pointer to the thread structure is, that it
> has to be initialized. Therefore _every_ NutThreadCreate must be
> adjusted for it to work.
I know. I just changed it for all architectures. And NutThreadCreate as
well :)
> Further on the thread structure is the same for
> every architecture. It can therefore easily be made architecture
> independent. The same for adding the deadbeef to the Stack. If the
> latter is moved to arch-independent a stack-check can be done on every
> context-switch and a something-horrible-happened-function can be called
> if it's overwritten. Or, you can just spare the deadbeef unless you're
> debugging. Again this only makes sense if it's not in the /arch.
I see what you are planing to do :) Ok, this as well should be moved to
architecture independand code. I saw you have written me a private mail
too. So perhaps let's discuss this further and let's bring this into the
official tree.
Having a stack check function would help _very much_, but it should be
only compiled if needed. So we should make it configurable.
> > I would not move NutThreadCreate anywhere else than into the arch
> > directory. All these thread specific funktions are highly architecture
> > specific and therefore should not be moved away. Addind new functions
> > that will be calles instead from a global NutThreadCreate function would
> > only add extra jumps and code size and does not make things cleaner.
> >
>
> Ok, but if you have a static inline NutThreadInitThreadStructure you
> have no overhead and a clean design (reasons see above.).
Are you shure? Defining inline functions does not work (inline) over the
border of a single c file, right? I don't know how it should work as the
compiler generates a single .o file for every c file. In this case the
compiler will call the function as a normal function, right?
> > Could you perhaps explain me in a few short headlines what you plan to
> > do? (Perhaps you simply write me a private mail in german)
> >
> I hope my explanations makes more sense. :-) If not, I'll send you a
> sample.
Great! Let's discuss in pm further!
Bye,
Ole
--
_____________________________________________________________
| |
| Embedded-IT Hard- und Softwarelösungen |
| |
| Ole Reinhardt Tel. / Fax: +49 (0)271 7420433 |
| Luisenstraße 29 Mobil: +49 (0)177 7420433 |
| 57076 Siegen eMail: ole.reinhardt at embedded-it.de |
| Germany Web: http://www.embedded-it.de |
| UstID / VAT: DE198944716 |
|_____________________________________________________________|
More information about the En-Nut-Discussion
mailing list