This is the mail archive of the ecos-discuss@sourceware.org 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: 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


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