public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Gall <tom_gall@vnet.ibm.com>
To: Michael Zhu <mylinuxk@yahoo.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: The CURRENT macro
Date: Thu, 03 Jan 2002 16:55:37 -0600	[thread overview]
Message-ID: <3C34E169.FFE2DBED@vnet.ibm.com> (raw)
In-Reply-To: <20020103213455.34699.qmail@web14911.mail.yahoo.com>

Michael Zhu wrote:
> 
> In Alessandro Rubini's book Linux Device Driver(Second
> Edition), Chatper 12, he said that "By accessing the
> fields in the request structure, usually by way of
> CURRENT" and "CURRENT is just a pointer into
> blk_dev[MAJOR_NR].request_queue". I know CURRENT is
> just a macro. Where can I find the definition of this
> macro?
> I just don't know how to get the struct request from
> the request_queue(a request_queue_t struct). CURRENT
> points to which field in the
> blk_dev[MAJOR_NR].request_queue? Thank you very much.

Look in include/asm-[your-arch]/current.h

It's architecture dependant. For instance on PPC64 we keep current in a
register.

Regards,

Tom

-- 
Tom Gall - [embedded] [PPC64 | PPC32] Code Monkey
Peace, Love &                  "Where's the ka-boom? There was
Linux Technology Center         supposed to be an earth
http://www.ibm.com/linux/ltc/   shattering ka-boom!"
(w) tom_gall@vnet.ibm.com       -- Marvin Martian
(w) 507-253-4558
(h) tgall@rochcivictheatre.org

  parent reply	other threads:[~2002-01-03 22:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-03 21:34 The CURRENT macro Michael Zhu
2002-01-03 21:48 ` Jonathan Corbet
2002-01-03 21:55   ` Arnaldo Carvalho de Melo
2002-01-04  8:03     ` Terje Eggestad
2002-01-03 22:01 ` Richard B. Johnson
2002-01-03 22:14 ` Peter Makholm
2002-01-03 22:55 ` Tom Gall [this message]
2002-01-03 22:57 ` Tom Gall

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=3C34E169.FFE2DBED@vnet.ibm.com \
    --to=tom_gall@vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mylinuxk@yahoo.ca \
    /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