I was advide the following here:
“The IOCTL looks at the list, if there are nodes - it consumes the oldest node
from the list and returns its data content to the caller.”
How can I create a list, write it in IsrDPC and the check its count in IOCTL request ?
Should I use "WdfCmResourceListGetCount ", “WdfChildListCreate” ?
Thanks,
Zvika Vered
IAI \ ELTA
> Should I use "WdfCmResourceListGetCount ", “WdfChildListCreate” ?
No, the usual InsertTailList and InitializeListHead
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Neither one will help. Sometimes a grep turns up the entirely wrong set of results :). A cm res list handles hardware resources assignment, a child list handles child device enumeration.
First thing you have to determine is at what irql you need all actors to synch at. Since you have a dpc, dispatch_level is it. That means that regardless of whatever list data structure you choose, you will need to use a KSPINLOCK to synchronize acess to it (unless you use a lock free struct like SLIST).
Second, you need to determine the resource requirements for your list and its usage. Is there a known max? Will there usually be only a few or alot of entries? Can adding an entry be allowed to fail?
A couple of options are LIST_ENTRY (and its associated set of helper APIs) and a ring buffer. The list entries are easy to use once you get the hang of it (that takes under half an hour), but you need to alloc an entry every time you insert into the list. A ring buffer works well if there is a known (or more likely an acceptable) max, but you have to manage the head/tail pointers yourself so there is a bit more debugging/development work. Of course, there are many other data structures you can use, you just need to pick one that meets your reqs and you are comfortable using…
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
-----Original Message-----
From: xxxxx@elta.co.il
Sent: Tuesday, December 23, 2008 7:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF- Managing list
I was advide the following here:
“The IOCTL looks at the list, if there are nodes - it consumes the oldest node
from the list and returns its data content to the caller.”
How can I create a list, write it in IsrDPC and the check its count in IOCTL request ?
Should I use "WdfCmResourceListGetCount ", “WdfChildListCreate” ?
Thanks,
Zvika Vered
IAI \ ELTA
—
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
veredz wrote:
I was advide the following here:
“The IOCTL looks at the list, if there are nodes - it consumes the oldest node
from the list and returns its data content to the caller.”
How can I create a list, write it in IsrDPC and the check its count in IOCTL request ?
Should I use "WdfCmResourceListGetCount ", “WdfChildListCreate” ?
You were also advised to find a helper.
Really. Many Windows driver devs sit at home
these days and would take a temp job.
– PA
***