[lkml]   [2002]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: The CURRENT macro
> In Alessandro Rubini's book Linux Device Driver(Second
> Edition), Chatper 12

Alessandro other guy...:)

> 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?

A little grepping in the source would give you the answer there. It's in

> 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.

CURRENT is one way. There's also functions like blkdev_entry_next_request
(also described in that chapter) that will pull a request off the queue for
you, if that's what you need.

Note that all this stuff has changed quite a bit in 2.5.


Jonathan Corbet
Executive editor,
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:15    [W:0.107 / U:1.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site