Ahh, but there is the rub Bill.
Microsoft does not provide you a means of physically removing the current,
mid-list, link from a doubly-linked list. All you have is RemoveEntryList
which is nothing but a macro around a mess of FLINK=/BLINK=. If in other
parts of your code you use ExInterlockedRemoveHeadList and
ExInterlockedInsertTailList to handle normal queue processing, you do NOT
have the same degree of functionality to remove an entry from the middle of
the list. Sorry, but in the wonderful world of virtual drivers and
miniports, you do not always have the luxury of having the interrupt object
handy to call KeSynchronizeExecution, which is a royal pain in the ass to
use anyway.
I still contend the system needs ExInterlockedRemoveEntryList for orthogonal
doubly-linked list management. But, as someone said, that is my opinion, and
that plus 1.90 MIGHT buy me a cup of bad tasting coffeee at Starbucks.
–
Gary G. Little
xxxxx@broadstor.com
xxxxx@inland.net
“Bill McKenzie” wrote in message
news:xxxxx@ntdev…
>
> You would still have to ExInterlockedPushEntrySList() each entry back on
the
> list yes? So, while it would save you some time, and that is good, it
still
> would not be as efficient as a doubly linked list in the same space if out
> of order access were common no?
>
> –
> Bill McKenzie
>
>
>
> “George Reilly” wrote in message
> news:xxxxx@ntdev…
>
> You can also use ExInterlockedFlushSList() to grab the entire SList at
> one go, which you can then traverse at your leisure. Much cheaper
> than repeatedly calling InterlockedPopEntrySList(). If you want a FIFO
> queue, just reverse the flushed list in place.
> –
> /George V. Reilly mailto:xxxxx@microsoft.com
> Internet Information Server / http.sys Developer
>
>
> -----Original Message-----
> From: Moreira, Alberto [mailto:xxxxx@compuware.com]
> Sent: Wednesday, May 22, 2002 2:53 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: opaque slist?
>
>
> I’m not familiar with this particular issue, but how about having two
> slists ? You use one as your “front list” and the other as your “back
> list”. Your items go to the front list. When you want to traverse it,
> repeatedly pop from the front list and push the items to the back list.
> When finished, you can pop the back list back into the front list. Or,
> if your items don’t depend on sequence, use the two slists as a double
> buffer, and have the list traversal be your swapbuffers.
>
> Alberto.
>
>
> -----Original Message-----
> From: Gary G. Little [mailto:xxxxx@broadstor.com]
> Sent: Wednesday, May 22, 2002 5:33 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: opaque slist?
>
>
> Tom,
>
> But then are you not simply “kicking against the pricks”? or “spitting
> into the wind”? The ability to traverse an SLIST does not exist in the
> DDK. So either you have to invent it, or use an existing methodology
> that has been blessed by MS.
>
> –
> Gary G. Little
> xxxxx@broadstor.com
> xxxxx@inland.net
>
> “Tom Stonecypher” wrote in message
> news:xxxxx@ntdev…
> >
> > Undoubtedly a number of different solutions can be imagined if no
> > SList is
> used. I was referring to
> > a method for handling the SList case, assuming it is a given that an
> > SList
> must be used. I don’t
> > like the method I outlined, but it is the only answer I know to the
> original question, “is there a
> > safe way of traversing an SList”.
> >
> > regards
> >
> > Tom Stonecypher
> > iStreamConsulting.com
> >
> > “Gary G. Little” wrote in message
> news:xxxxx@ntdev…
> > >
> > > A simpler implementation would be to use a doubly linked list —
> > > LIST_ENTRY.
> > >
> > > –
> > > Gary G. Little
> > > xxxxx@broadstor.com
> > > xxxxx@inland.net
> > >
> > > “Tom Stonecypher” wrote in message
> > > news:xxxxx@ntdev…
> > > >
> > > > Hi, Rajeev,
> > > >
> > > > Iterating throught the SList elements is not safe. SList
> manipulations
> > > are performed only at the
> > > > queue head, and always interlocked (an atomic update across all
> > > processors). There’s no way to lock
> > > > accesses on arbitrary list elements against the manipulations at
> > > > the
> head.
> > > >
> > > > The only way to safely do what you want with an SList is to pop
> > > > every
> > > entry using
> > > > ExInterlockedPopEntrySList, save to a private list, and then push
> > > > back
> to
> > > the list using
> > > > ExInterlockedPushEntrySList when done. This would have abysmal
> > > performance implications in a common
> > > > code path, but might be acceptable for an infrequent code path,
> > > > like a
> > > rare error path.
> > > >
> > > > Tom Stonecypher
> > > > iStreamConsulting.com
> > > >
> > > > “Rajeev Rao” wrote in message
> news:xxxxx@ntdev…
> > > > >
> > > > > Hi,
> > > > > I need to iterate through an SLIST. There aren’t any functions
>
> > > > > to do so. Can I access the SLIST datamembers and move from one
> > > > > node to the next manually? Is this safe?
> > > > >
> > > > > Rajeev
> > > > >
> > > > >
> > > > >
> ________________________________________________________________________
> > > > > Everything you always wanted to know about cars and bikes,now
> > > > > at: http://in.autos.yahoo.com/cricket/tracker.html
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@compuware.com
> To unsubscribe send a blank email to %%email.unsub%%
>
>
>
> The contents of this e-mail are intended for the named addressee only.
> It contains information that may be confidential. Unless you are the
> named addressee or an authorized designee, you may not copy or use it,
> or disclose it to anyone else. If you received it in error please notify
> us immediately and then destroy it.
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@microsoft.com To
> unsubscribe send a blank email to %%email.unsub%%
>
>
>
>
>
>