Thread (3 messages) 3 messages, 3 authors, 2012-07-18

setup_thread_stack

From: Francesco Scali <hidden>
Date: 2012-07-17 19:15:50

Hi,
I'm totally new to kernel code, just trying to understand the basics of the
core subsystems.
During the do_fork call, there is a call to dup_task_struct, which in turn
calls setup_thread_stack.
What's  this call supposed to do? Inside I can see a call to the
"task_thread_info" macro, but I don't quite understand it:

#define task_thread_info(task) ((struct thread_info *)(task)->stack)

can a task_struct be cast to a thread_info? perhaps my C knowledge should
be improved..I know :(

Sorry for the trivial question..just trying to understand :)

Regards,

Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120717/bce920a3/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help