Sheesh. Has anyone else found WDF’s work item deletion strategy lacking? Here’s the deal…
Unlike WDM, WDF does not let us free work items ‘at will.’ In WDF, MSDN tells us: “The framework will delete the work-item object when it deletes the device object.” In contrast, WDM lets us free a work item at any time with IoFreeWorkItem().
WDF’s ‘free work item only on device object deletion’ strategy ain’t working for me. In particular, I’m stealing parts from a WDM driver that allocates work items on a ‘per task’ basis. (Task descriptors and their work items are allocated within a DpcForIsr.) The WDM solution seems nifty, because for any number of tasks, the work item portion is completely independent of other tasks. (That is, as interrupts for various tasks occur their PASSIVE_LEVEL stuff is farmed out really elegantly.) As tasks complete their work items are freed. Very simple. Very easy.
No such luck for WDF, because WDF won’t free work items until the Device Object is deleted.
… Or am I just missing something ? (Or are you thinking I should manage a queue of tasks? Or that I could create a per-task DO?)
I value your thoughts and insights,
Ryan
On Fri, 19 Dec 2008 11:14:30 -0500 (EST), xxxxx@cruzio.com wrote:
Sheesh. Has anyone else found WDF’s work item deletion strategy
lacking? Here’s the deal…
Unlike WDM, WDF does not let us free work items ‘at will.’ In WDF,
MSDN tells us: “The framework will delete the work-item object when
it deletes the device object.” In contrast, WDM lets us free a work
item at any time with IoFreeWorkItem().
WDF’s ‘free work item only on device object deletion’ strategy
ain’t working for me. In particular, I’m stealing parts from a WDM
driver that allocates work items on a ‘per task’ basis. (Task
descriptors and their work items are allocated within a DpcForIsr.)
The WDM solution seems nifty, because for any number of tasks, the
work item portion is completely independent of other tasks. (That
is, as interrupts for various tasks occur their PASSIVE_LEVEL stuff
is farmed out really elegantly.) As tasks complete their work items
are freed. Very simple. Very easy.
No such luck for WDF, because WDF won’t free work items until the
Device Object is deleted.
If you want them deleted I thought you called WdfObjectDelete on them at the end
of the Handler. Does this not actually delete them ? Does it just mark them for
deletion later ?
–
Graeme Griffiths
Image Processing Techniques Ltd.
+44 1256 345 927
*****************************************************************************
The contents of this Email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom it is
addressed.
The views stated herein do not necessarily represent the view of the company.
If you are not the intended recipient of this Email you may not copy, forward,
disclose or otherwise use it or any part of it in any form whatsoever.
If you have received this mail in error please Email the sender.
*****************************************************************************
Omnitek/Image Processing Techniques Ltd
Tel : +44(0)1256345900
Fax : +44(0)1256345901
Website : www.omnitek.tv
Registered Office : Unit 3, Intec 2, Wade Road, Basingstoke, Hampshire, RG24 8NE
Registration Number : 3564291
Place of Registration : England
VAT Registration : 709198411
Graeme,
You are quite correct. (And I learned something.)
Thanks!
Ryan