Irp->Tail.Overlay.Thread

Hi,

As I was looking through the Irp description in MSDN, I saw
Irp->Tail.Overlay.Thread .
What is this used for?
From MSDN it explain:
Is a pointer to the caller’s thread control block. Higher-level drivers that
allocate IRPs for lower-level removable-media drivers must set this field in
the IRPs they allocate. Otherwise, the FSD cannot determine which thread to
notify if the underlying device driver indicates that the media requires
verification.
Does that means that only removable devices will set this field?
So can I say that IDE devices will not?

But it doesnt seem that way.

Thank You!

cheers,
vincent


Send a fun phone greeting to your friend!
http://www.msn.com.sg/mobile/fungreetings/

vincent gambit wrote:

As I was looking through the Irp description in MSDN, I saw
Irp->Tail.Overlay.Thread .
What is this used for?

This field is used for so-called “synchronous” IRPs, which are tied to a
particular thread. If that thread terminates, the I/O Manager will
cancel all the synchronous IRPs belonging to the thread. As the doc
indicates, the field will also be used by a file system driver when it
thinks that the media has changed.

I think the doc is confusing you, though. This field is automatically
set by the two routines (IoBuildSynchronousFsdRequest and
IoBuildDeviceIoControlRequest) that device drivers use to build
synchronous IRPs. I don’t think device drivers should be tinkering with
this field directly at all, not least because drivers don’t have any
safe way to put an IRP onto a thread’s queue. I have enough trouble
reading the mind of my spouse of 33 years, so I won’t speculate as to
why the DDK doc even talks about this field.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

> As I was looking through the Irp description in MSDN, I saw

Irp->Tail.Overlay.Thread .

The thread which originated the IRP, which is used in
IoGetRequestorProcess and to queue the IRP to the thread.

Max

the IO system sets this field when it builds IRPs to send to the top of
a driver stack (in response to ReadFile, for example). The file system
may also set this when it builds requests to send to the storage
drivers. The storage stack tends not to set this field at all.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
Sent: Thursday, June 12, 2003 1:18 AM
To: NT Developers Interest List
Subject: [ntdev] Irp->Tail.Overlay.Thread

Hi,

As I was looking through the Irp description in MSDN, I saw
Irp->Tail.Overlay.Thread .
What is this used for?
From MSDN it explain:
Is a pointer to the caller’s thread control block. Higher-level drivers
that allocate IRPs for lower-level removable-media drivers must set this
field in the IRPs they allocate. Otherwise, the FSD cannot determine
which thread to notify if the underlying device driver indicates that
the media requires verification.
Does that means that only removable devices will set this field?
So can I say that IDE devices will not?

But it doesnt seem that way.

Thank You!

cheers,
vincent


Send a fun phone greeting to your friend!
http://www.msn.com.sg/mobile/fungreetings/


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com