Re: [NTDEV][WIN2k][WINXP] Use of the ExInterlockedXxx- x function calls across different IRQL le

Not for spinlocks. The ISR will block the lock-holding thread if the ISR
runs on the same cpu as the lock-holding thread, causing deadlock. That is
why exinterlockxxx requires that the IRQL be DIRQL, if the lock is acquired
from the ISR, for all threads that use the lock. This prevents the ISR from
running on that cpu.

NT does have work arounds for priority inversion for thread-based
synchronization objects, but it is more of an heuristic than a specific
scheduling policy.

Mark Roddy
xxxxx@hollistech.com
www.hollistech.com
603 321 1032
WindowsNT Windows 2000 Consulting Services

-----Original Message-----
From: Ramit Bhalla [mailto:xxxxx@wipro.com]
Sent: Wednesday, May 02, 2001 5:06 AM
To: NT Developers Interest List
Subject: [ntdev] Re: [NTDEV][WIN2k][WINXP] Use of the ExInterlockedXxxx
function calls across different IRQL levels

Does Windows support Priority Inversion??
That is if one thread holds the lock and it is interrupted by an ISR which
tried to acquire the same lock, then the thread that was holding the lock is
given pref first to execute and then the ISR is executed.

Ramit.
----- Original Message -----
From: “Maxim S. Shatskih”
To: “NT Developers Interest List”
Sent: Wednesday, May 02, 2001 2:08 AM
Subject: [ntdev] Re: [NTDEV][WIN2k][WINXP] Use of the ExInterlockedXxxx
function calls across different IRQL levels

> > Given that I have a doubly linked list, and that I am using
> > ExInterlockedInsertTailList and ExInterlockedRemoveHeadList to access
> items
> > in that list, must the list be accessed only at the highest IRQL, or may
> it
> > be accessed at any IRQL? Specially, completed IRPs will be hung on the
> list
> > for deferred completion while in my ISR and at DIRQL. Each IRP will then
> be
> > removed from the list in the DpcForIsr routine and then completed while
at
> > DISPATCH_LEVEL.
> >
> > Is that kosher, or must the list only be accessed at DIRQL?
>
> Imagine:
> - you do not raise an IRQL and perform the interlocked operation from
> DISPATCH_LEVEL
> - the ISR interrupts it…
> - …and tries to acquire the same spinlock.
>
> Max
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@wipro.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


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