kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* stack pointer
@ 2016-03-07  7:37 Nitin Varyani
  2016-03-07  8:05 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 2+ messages in thread
From: Nitin Varyani @ 2016-03-07  7:37 UTC (permalink / raw)
  To: kernelnewbies

struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0
stopped */* void *stack;* atomic_t usage; unsigned int flags; /* per
process flags, defined below */ unsigned int ptrace;


What does the field void *stack indicate here?
Is it the pointer to kernel stack of the process?

Where is the stack pointer for the current process stored in linux?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160307/a60bcd2e/attachment.html 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* stack pointer
  2016-03-07  7:37 stack pointer Nitin Varyani
@ 2016-03-07  8:05 ` Valdis.Kletnieks at vt.edu
  0 siblings, 0 replies; 2+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2016-03-07  8:05 UTC (permalink / raw)
  To: kernelnewbies

On Mon, 07 Mar 2016 13:07:14 +0530, Nitin Varyani said:

> Where is the stack pointer for the current process stored in linux?

In the stack pointer register, of course. (And if the code was compiled
with -fomit-stack-pointer there isn't even one. :)

The fun and games starts when you talk about the stack for a process that
*isn't* currently active on a CPU....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160307/8010662c/attachment.bin 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-07  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07  7:37 stack pointer Nitin Varyani
2016-03-07  8:05 ` Valdis.Kletnieks at vt.edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).