WdfWaitLockAcquire The sequence:
KeEnterCriticalRegion
KeWaitForSingleObject
WdfWaitLockCreate KeInitializeEvent
WdfWaitLockRelease The sequence:
KeSetEvent
KeLeaveCriticalRegion
These are the WDM equivalents for WDF functionalities as per Microsoft's
porting WDM to KMDF document.
My earlier question might be incorrect. I agree that KeWaitForSingleObject()
does not put the thread into wait state unless the object is not available,
as for the KEVENT is considered it can be initialized with non signalled
state so that the kewaitforsingleobject(event, NULL) puts a thread into wait
state until some other thread moves the event into signalled state. So my
question here is can we acheive this similar operation with WDFWAITLOCK.
In other words, we have an option to configure initial value of an event
using KeInitializeEvent so that we could make KeWaitForSingleObject to wait
for the event when it encounters first time(after KeInitializeEvent). If
WDFWAITLOCK is an equivalent of KEVENT, then could we initialize the state of
lock object while creating lock using WdfWaitLockCreate so that
WdfWaitLockAcquire waits for the lock object when it encounters for the first
time.
"Don Burn" wrote:
> I can't imagine why you would think it has anything to do with KEVENTS.
> Take a look at the various mutexs. Also, you are incorrect on
> KeWaitForSingleObject it does not put the thread into a wait state unless
> the object is not available.
>
>
> --
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
>
>
> "Murugesan" <> wrote in message
> news:41EC25C5-EC76-4620-ACA5-...
> > Hi all,
> > From the WDF documentation, WdfWaitLock is the replacement for
> > KEVENT(WDM).
> > So if a thread calls wdfwaitlockacquire() will it be put in wait state
> > eventhough the lock object is available.
> > In other words, is wdfwaitlockacquire() & wdfwaitlockrelease() an exact
> > replacement of Kewaitforsingleobject() & KeSetEvent() ?
> >
> > Thanks,
> > Murugesan
> >
> > __________ Information from ESET NOD32 Antivirus, version of virus
> > signature database 4593 (20091110) __________
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> >
> >
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4593 (20091110) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>
> .
>