how i can determine utcb loaction in order to make thread
norman.feske at genode-labs.com
Fri Apr 1 06:04:35 CEST 2011
On 04/01/2011 01:02 AM, Jason Philip wrote:
> I take your advice but nothing change. I do not know what you mean
> by "use the top of the stack rather than the bottom" if i say
> "sp = (L4_Word_t)stack" would that mean the start address of the
> array? But just in case I use "sp = stack"
No, use 'sp = &stack'. This way, the initial sp points to the
address just beyond the stack array. When the first stack element is
pushed, the stack pointer gets pre-decremented and thus, the first
element gets stored at offset '1024 - sizeof(L4_Word_t)'.
Please also remove the 'L4_Wait' call from your 'Jenev' function. There
is no need to explicitly wait for the startup message. This message is
implicitly handled by the kernel to start the execution of the new
thread. As your code stands right now, the new thread would infinitely
wait for a new message because no one is sending anything.
BTW, you could have figured this out by yourself with the help of the
Pistachio kernel debugger. Please do not expect the subscribers of this
mailing list to lend a helping hand for debugging your program if you
are not willing to at least give the kernel debugger a serious try.
Dr.-Ing. Norman Feske
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the l4-hackers