All of lore.kernel.org
 help / color / mirror / Atom feed
From: francesco.scali@gmail.com (Francesco Scali)
To: kernelnewbies@lists.kernelnewbies.org
Subject: setup_thread_stack
Date: Tue, 17 Jul 2012 21:15:50 +0200	[thread overview]
Message-ID: <CALm2k_8zYaGAVwYZfVXTVa8AjEGPG0-Vqf5HTp4c_QyjXsWZYg@mail.gmail.com> (raw)

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 

             reply	other threads:[~2012-07-17 19:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 19:15 Francesco Scali [this message]
2012-07-18  2:28 ` setup_thread_stack 卜弋天
2012-07-18  2:31 ` setup_thread_stack Mulyadi Santosa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALm2k_8zYaGAVwYZfVXTVa8AjEGPG0-Vqf5HTp4c_QyjXsWZYg@mail.gmail.com \
    --to=francesco.scali@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.