March 7, 2016
7:37 a.m.
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?
March 7, 2016
8:05 a.m.
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....
3812
Age (days ago)
3812
Last active (days ago)
1 comments
2 participants
participants (2)
-
Nitin Varyani -
Valdis.Kletnieks@vt.edu