All of lore.kernel.org
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: setup_thread_stack
Date: Wed, 18 Jul 2012 09:31:18 +0700	[thread overview]
Message-ID: <CAGdaadb=nsYH1acCk3xbSDtL-1=8+ptAZ+ShkhuUCQQvF3Y06w@mail.gmail.com> (raw)
In-Reply-To: <CALm2k_8zYaGAVwYZfVXTVa8AjEGPG0-Vqf5HTp4c_QyjXsWZYg@mail.gmail.com>

Hi :)

On Wed, Jul 18, 2012 at 2:15 AM, Francesco Scali
<francesco.scali@gmail.com> wrote:
> 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)

IMHO, it means that (in the following order):
1. get the task_struct ( you probably already know this)
2. get its stack property (you probably already know this too :) )

And that's it. That's the function of  task_thread_info() macro: to
return the stack area of that task. IIRC too, stack area is where
thread_info belongs to.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

      parent reply	other threads:[~2012-07-18  2:31 UTC|newest]

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

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='CAGdaadb=nsYH1acCk3xbSDtL-1=8+ptAZ+ShkhuUCQQvF3Y06w@mail.gmail.com' \
    --to=mulyadi.santosa@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.