Walter,
I have a question. If i do not want do an operation in the caller
process context and do that operation in system context. I am sure to be
called at PASSIVE_LEVEL and i do not hold any spin locks. I can queue a work
item and wait for the work item to be completed by waiting on an event.
I can, right?
-Srin.
-----Original Message-----
From: Walter Oney [mailto:xxxxx@oneysoft.com]
Sent: Thursday, September 26, 2002 4:50 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Who is responsible for reclaiming storage allocated
for WorkItem?
Bala wrote:
Can only caller supplied routine free the storage allocated for
WorkItem? If so, could you please explain it further? Or the caller can
wait on event and free the allocated storage?
The callback routine frees the storage. Since you only get one context
parameter, you need to define a context structure that includes a
pointer to the workitem. The WORKITEM sample in my WDM book (as modified
by the service pack at my web site) shows all the mechanics.
As far as waiting in the caller to free the work item, think about it:
You’re presumably running at DISPATCH_LEVEL when you create the work
item (or else you would have just done whatever it is right there), and
you *cannot* wait.
–
Walter Oney, Consulting and Training
Check out new US seminar schedule at http://www.oneysoft.com
You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to %%email.unsub%%