Stack of a thread

From: anuya.kulkarni
Date: Fri Apr 02 2004 - 04:36:08 EST


Hello,

I have a doubt regarding stack of a thread.
I want to know how it is organized ?

Say I have a function with 1 input parameter and
1 local veriable. If I know the stack base pointer,
can I predict the location of the input parameter and
local variable.

I have a POSIX thread with stack base pointer and size of
stack specified by me. RedHat Linux 7.2 (Kernel 2.4.7-10)

Also, if I want to copy the snapshot of stack of this thread and
map to some memory region on another machine and give this address
of this region as stack base for the same thread function to run on
other
machine, will it work as if there is no migration from one machine to
other ? Here I assume that transfer of stack across machines and
privilages are
not the issues.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/