From: aleben358@gmail.com (alex ben)
To: kernelnewbies@lists.kernelnewbies.org
Subject: file arch/x86...current.h, definition of per_cpu objects
Date: Wed, 28 Mar 2012 17:47:02 +1100 [thread overview]
Message-ID: <CAEWNDEZF5JbR2f7zi_yYVS22xpxXMq+MRDT925D0W7ToqkPyEg@mail.gmail.com> (raw)
As I understand, the macro current in x86 expands to a function
returning the value in current_task, which is defind for each cpu (is
it?), and the segment register %fs points to a descriptor with a base
address of the offset per-cpu, for (this? all?) per-cpu objects..
So, basically we are reading the object current_task + the offset
contained in the base of the percpu (27th in the GDT) segment..
Could somebody elaborate? thanks
reply other threads:[~2012-03-28 6:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAEWNDEZF5JbR2f7zi_yYVS22xpxXMq+MRDT925D0W7ToqkPyEg@mail.gmail.com \
--to=aleben358@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 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).