librelist archives

« back to archive

Purpose of "extern int _stack" in main

Purpose of "extern int _stack" in main

From:
Spencer Russell
Date:
2010-10-08 @ 20:47
What is the purpose of this line in tests-main.c? It doesn't seem to be 
referenced anywhere else in the code. Does it somehow effect the location 
of other declared variables such as the thread stack arrays?

Thanks,
Spencer

Re: [atomthreads] Purpose of "extern int _stack" in main

From:
Kelvin Lawson
Date:
2010-10-09 @ 11:08
Hi Spencer,

This is historical and the line can be removed. It previously used
this to find out the top of the stack from the atomthreads.lkf file
(it is defined as 0x7ff in there), but it now uses the
main_thread_stack[] space. I will remove the line and push to Github.

Thanks,
Kelvin.


On 8 October 2010 21:47, Spencer Russell <srussell@bulogics.com> wrote:
> What is the purpose of this line in tests-main.c? It doesn't seem to be 
referenced anywhere else in the code. Does it somehow effect the location 
of other declared variables such as the thread stack arrays?
>
> Thanks,
> Spencer
>