Re: [NTDEV][WIN2k][WINXP] Use of the ExInterlockedXxxx function calls across different IRQL levels

From the DDK:

“If the caller uses only ExInterlocked…List routines to manipulate the
list, then these routines can be called from a single IRQL that is <=
DIRQL. If other driver routines access the list using any other routines,
such as the noninterlocked InsertHeadList, then callers of
ExInterlocked…List must be at <= DISPATCH_LEVEL.”

I think the key phrase here is “If the caller uses only ExInterlocked…List
routines to manipulate the list”. Not sure about that single IRQL comment
though. I would be curious to see the disasm on an MP build.

Bill M.

On 05/01/01, ““Gary G. Little” ” wrote:
> James,
>
> Actually it does a “pushfd/cli … popfd” at least on the x86. From what I
> have seen, if my ISR tries to insert an item on the list while a DISPATCH
> function has the Ex… spinlock … bang system deadlock. Hmmm I was doing
> that months ago and I may have been using that lock in KeAcquire… code.
> The “pushfd/cli” should prevent the deadlock when only using the spinlock
> via ExInterlocked… functions. If someone did a KeAcquire … on the
> spinlock, that could lead to a deadlock.
>
> Gary
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of James Antognini
> Sent: Tuesday, May 01, 2001 8:57 AM
> To: NT Developers Interest List
> Subject: [ntdev] Re: [NTDEV][WIN2k][WINXP] Use of the ExInterlockedXxxx
> function calls across different IRQL levels
>
> Reading the doc, I’d say that the IRQL of callers is unimportant so long
> as it’s <= DIRQL and so long as the list structure is in non-paged
> storage. I’d guess that ExInterlockedInsertTailList() obtains a DIRQL
> lock, does its thing and releases the lock.
>
> –
> James Antognini
> IBM Watson Research
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@delphieng.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


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