Messages in this thread | | | Date | Thu, 3 Jan 2002 17:01:18 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: The CURRENT macro |
| |
On Thu, 3 Jan 2002, 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. > > Michael
If symlinks are set up:
/usr/include/linux/blk.h
#ifndef _BLK_H #define _BLK_H
[SNIPPED...]
#ifndef CURRENT #define CURRENT blkdev_entry_next_request(&blk_dev[MAJOR_NR].request_queue.queue_head) #endif
#endif /* _BLK_H */
Otherwise:
../linux-n.n.n/include/linux/blk.h
FYI. To find things in the future, do: cd /usr/include/linux grep WHAT_TO_FIND *.h | more cd ../asm grep WHAT_TO_FIND *.h | more
Cheers, Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).
I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |