RE: [NTDev] Using ExInterlockedInsertTailList in uni- and multi-processor systems ...

“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.”

I think this is DDK-speak for: you have to raise to DIRQL before calling
this function. (Already done for your interrupt routine.) You cannot call
the ExInterlocked…List functions at both DIRQL and DISPATCH_LEVEL or you
will deadlock.

You could of course always acquire the lock at DISPATCH_LEVEL, but obviously
not from your isr.

You will deadlock on an MP system too, it just won’t be as easy to do. (The
other CPUs have to be busy with a higher priority interrupts so that your
CPU, holding the lock at DISPATCH_LEVEL, takes the lower priority interrupt
and attempts to acquire the lock at DIRQL.)

Mark Roddy
Windows 2000/NT Consultant
Hollis Technology Solutions
xxxxx@hollistech.com
603 321 1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gary G. Little
Sent: Wednesday, March 21, 2001 3:07 PM
To: NT Developers Interest List
Subject: [ntdev] [NTDev] Using ExInterlockedInsertTailList in uni- and
multi-processor systems …

Windows 2000
128 Meg
Dual or Uni-processor

I have a queue that is accessed at both DISPATCH_LEVEL and at DIRQL. The
queue is built with a lock for use by the ExInterlockedXxxx functions.
Accessing this queue at either level appears to work on a dual processor,
but the driver is hanging on a customers uni-processor system, and I think
this is the culprit.

On a dual processor, one processor can be at DIRQL and looping waiting on
the queue lock, while the other processor, which has the lock, finishes up
its queue activity and then releases the lock. However, on a
uni-processor,
can an interrupt arbitrarily raise IRQ to DIRQL and then attempt
to acquire
the spinlock before it is released? If ExInterlockedXxxx is
atomic, which I
believe it is, then the interrupt should be delayed until
ExInterlockedXxxx
completes.

Gary


You are currently subscribed to ntdev as: xxxxx@wattanuck.mv.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