ExInterlocked..List routines

Hi

Can somebody clarify this DDK statement.

If the caller uses only ExInterlocked…List routines to manipulate the list, 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, callers of ExInterlocked…List must be at <= DISPATCH_LEVEL.

Does this mean that I can use the ExInterlocked…List routines in my NDIS ISR and DPC routine to manage queues?

I need to manage a queue of buffers in the ISR which are then processed in the DPC, where the ISR can be recalled while DPC processing is occuring

Unless there is a better way.

Thanks

Yes you can use the ExInterlocked…List routines to manage the queues,
there are really two rules for using these routines at DIRQL.

  1. Only use these routines to manage the list. I.E. no regular list
    routines/macros and no accessing the list structure directly
  2. Only use the spinlock for controlling this list. I.E. except for
    initialization only reference the spinlock with the ExInterlocked routines.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

wrote in message news:xxxxx@ntdev…
> Hi
>
> Can somebody clarify this DDK statement.
>
> If the caller uses only ExInterlocked…List routines to manipulate the
> list, 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, callers of ExInterlocked…List must
> be at <= DISPATCH_LEVEL.
>
> Does this mean that I can use the ExInterlocked…List routines in my NDIS
> ISR and DPC routine to manage queues?
>
> I need to manage a queue of buffers in the ISR which are then processed
> in the DPC, where the ISR can be recalled while DPC processing is
> occuring
>
> Unless there is a better way.
>
> Thanks
>

Thanks!!

Cheers Don

----- Original Message -----
From: “Don Burn”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Thursday, August 30, 2007 1:20 PM
Subject: Re:[ntdev] ExInterlocked…List routines

> Yes you can use the ExInterlocked…List routines to manage the queues,
> there are really two rules for using these routines at DIRQL.
>
> 1. Only use these routines to manage the list. I.E. no regular list
> routines/macros and no accessing the list structure directly
> 2. Only use the spinlock for controlling this list. I.E. except for
> initialization only reference the spinlock with the ExInterlocked
> routines.
>
> –
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
> wrote in message news:xxxxx@ntdev…
>> Hi
>>
>> Can somebody clarify this DDK statement.
>>
>> If the caller uses only ExInterlocked…List routines to manipulate the
>> list, 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, callers of ExInterlocked…List must
>> be at <= DISPATCH_LEVEL.
>>
>> Does this mean that I can use the ExInterlocked…List routines in my NDIS
>> ISR and DPC routine to manage queues?
>>
>> I need to manage a queue of buffers in the ISR which are then processed
>> in the DPC, where the ISR can be recalled while DPC processing is
>> occuring
>>
>> Unless there is a better way.
>>
>> Thanks
>>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
>