Re: [NTDEV] Queue Management

Thanks for reducing my ignorance. In the future, I might want something
like that.

Phil

-----Original Message-----
From: PeterGV [mailto:xxxxx@osr.com]
Sent: Thursday, July 26, 2001 2:19 AM
To: NT Developers Interest List
Subject: [ntdev] Re: [NTDEV] Queue Management

“Barila, Phil” wrote in message news:xxxxx@ntdev…
>
> OK, I’ll display my ignorance for all to see. I don’t deal with
interlocked
> lists in my environment, so I don’t have a lot of reason to think about
> them. But I am curious to know how you can be bullet-proof sure that you
> have a valid pointer to an arbitrary element in the list without having
> traversed it.
>

Take the simple case of a storage driver that does tagged queuing: An IRP
arrives, you put the IRP on the interlocked “in progress” list, using
ExInterlockedInsertTailList. You make the I/O request represented by the
IRP active on the hardware, and give the hardware a context “tag” to
identify the request back to you when its finished. The “tag” is a pointer
to the IRP.

Your device interrupts, and gives you the tag of the entry that was
completed (any one of the many requests that are in progress). You call the
now non existant ExInterlockedRemoveEntryList(). You then take the IRP
(removed from the “in progress” list) and put it on the done list, and queue
your DPCforIsr.

So, instead of using an interlocked list, now you guard the list with the
interrupt spinlock. Oh well…

Peter


You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com