Thanks for your reply. I agree with what you said. Is there any code related to this available in kernel or any other source? as It would be more helpful to understand this concept.
On Sat, Jun 5, 2010 at 1:44 AM, Vimal <[email protected]> wrote: > On 4 June 2010 17:16, Group <[email protected]> wrote: > > Hi, > > > > Is it possible to access threads stack (not shared) from another thread? > > I have seen an API which gets the attributes for the stack > > pthread_attr_getstack(). > > But is it possible to access the DATA on the thread stack?. Is there any > api > > for it?. > > Since the stack address is just a memory address, so you can > dereference it to read values. If you as a program writer know which > function executes on the stack, you could create a struct that reads > values off it (integers, strings, floats, etc., instead of just > bytes). > > -- > Vimal >
