This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: a question about the thread stack
- From: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- To: "eCos Discuss" <ecos-discuss at ecos dot sourceware dot org>
- Date: Sun, 14 Jan 2007 01:40:57 -0800
- Subject: RE: [ECOS] a question about the thread stack
> From: Yi Tang [mailto:yitang@itee.uq.edu.au]
>
> Thank you for your kind reply, then may I ask you which
> function or which
> source file in ecos defined such thread property? As in
> standard C/C++,
> normally we use malloc() to allocate memory to variables or
> pointers, but
> eCos seems not need that process. So I'm a bit curious how
> you guys manage
> that?
It's not an OS function call, it's directly compiled hardware instructions,
involving the stack pointer, and usually one other register called the base
pointer or frame pointer. And it's the same regardless of the OS.
If you really want to know exactly how it works, you'll have to learn the
instruction set for your machine, and then tell the compiler to emit
assembly language so that you can read it.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss