Can ISR routine offer context parameter for DPC routine in WDF driver?
thanks a lot!!
Can ISR routine offer context parameter for DPC routine in WDF driver?
thanks a lot!!
Sorry… I can’t resist:
Do you SEE a context parameter on WdfInterruptQueueDpcForIsr ?
So, you’re question is… what precisely ??
Peter
OSR
Like Peter said, there ain’t no context parameter, so no. But, one nice
thing about the KMDF is that you can create a context on a KMDF object, and
I know of no reason why you cannot do that for WDFINTERRUPT, and then use
GetContext to extract that context from the object in question.
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Sunday, July 11, 2010 9:15 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] a question about WDF driver.
Sorry… I can’t resist:
Do you SEE a context parameter on WdfInterruptQueueDpcForIsr ?
So, you’re question is… what precisely ??
Peter
OSR
—
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
Use the context of WDFINTERRUPT object?
I seems that it is a good idea.
Should I use the interrupt lock to protect the context when I access the context of WDFINTERRUPT object?
thanks!
==============================================
Like Peter said, there ain’t no context parameter, so no. But, one nice
thing about the KMDF is that you can create a context on a KMDF object, and
I know of no reason why you cannot do that for WDFINTERRUPT, and then use
GetContext to extract that context from the object in question.
I’m going to default back to what Peter asked … what are you trying to do?
If the data within that context will not be used or accessed/changed outside
of the DPC or ISR, such as the WDFDEVICE and WDFDRIVER objects, then you may
not need to worry about the syncing. If syncing is going to be a major issue
then again I default back to the question … What are you trying to do?
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Sunday, July 11, 2010 9:51 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] a question about WDF driver.
Use the context of WDFINTERRUPT object?
I seems that it is a good idea.
Should I use the interrupt lock to protect the context when I access the
context of WDFINTERRUPT object?
thanks!
==============================================
Like Peter said, there ain’t no context parameter, so no. But, one nice
thing about the KMDF is that you can create a context on a KMDF object, and
I know of no reason why you cannot do that for WDFINTERRUPT, and then use
GetContext to extract that context from the object in question.
—
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
The content of context will be modified by ISR and read by DPC.
so, It seems that syncing should be considered.
====================================
I’m going to default back to what Peter asked … what are you trying to do?
If the data within that context will not be used or accessed/changed outside
of the DPC or ISR, such as the WDFDEVICE and WDFDRIVER objects, then you may
not need to worry about the syncing. If syncing is going to be a major issue
then again I default back to the question … What are you trying to do?
> The content of context will be modified by ISR and read by DPC.
Just put these fields to the device extension, access them from ISR directly, and from DPC using KeAcquireInterruptSpinLock.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
OP: There aren’t any cookbooks available here. We don’t know the structure of your driver, so it’s not possible for us to know if you should use the interrupt lock to protect the context.
You should use appropriate serialization. That’s the only accurate thing ANYbody can tell you about what level of serialization is most appropriate, absent any additional information from you.
Peter
OSR