From: eagersh on
On Nov 19, 11:59 pm, Tim Roberts <t...(a)probo.com> wrote:
> Prakash Manannavar <PrakashMananna...(a)discussions.microsoft.com> wrote:

> The RIGHT way do to this is to queue up a work item with IoQueueWorkItem.
> The callback will be called at PASSIVE_LEVEL.
I would like to add that OP could move his KeWaitForSingleObject into
work item or created system thread and synchronize the work item with
a drivers Completion/Cancellation Routine. It is little bit
complicated but it is safe for sure.

Igor Sharovar
From: Doron Holan [MSFT] on
lowering irql that you did not raise does not cause priority inversion. it
causes deadlocks and strange undiagnosible errors.

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"David Craig" <drivers(a)noemail.noemail> wrote in message
news:OkgjzUaaKHA.1592(a)TK2MSFTNGP06.phx.gbl...
> NO!!! That will/can cause priority inversion.
>
> "Prakash Manannavar" <PrakashManannavar(a)discussions.microsoft.com> wrote
> in message news:BAD738A5-ECE4-4D4B-8CA5-588A2232CD9D(a)microsoft.com...
>> Thanks Scott,
>>
>> I have some issues,
>>
>> 1. If waiting with KeWaitForSingleObejct at IRQL <= DISPATCH_LEVEL, Is
>> there
>> any specific reason which has been supported by OS?
>>
>> 2. I read KeRaiseIrql and KeLowerIrql functions, As I read we can raise
>> IRQL
>> first and then we can lower it to the previous level. Is there any
>> functions
>> to lower the IRQL and then raise it to the previous level?
>>
>> --
>> ~~~~~
>> Prakash A Manannavar,
>> Bangalore/Bengaluru.
>>
>
>
From: Prakash Manannavar on
Thanks guys,

Now I have created WorkItem and queuing it.

In DDK it has been told that "caller of KeWaitForSingleObject can be run at
IRQL <= DISPATCH LEVEL"

I wanted to know that, is there any specific scenarios we can wait there??

--
~~~~~
Prakash A Manannavar,
Bangalore/Bengaluru.


From: David Craig on
I would take a class about driver development.

I would also use the WDK and not a DDK. Version 7.0.0 A.K.A. 7600.16385.0
is the most recent and supports back to XP.

The documentation describes how you can use KeWFSO. You can 'wait' at
DISPATCH_LEVEL or lower, however the 'wait' at DISPATCH_LEVEL must be zero,
which makes it a test and not a real wait. In the wrong context waiting at
APC_LEVEL can cause a deadlock, though that is usually only in the file
systems area.


"Prakash Manannavar" <PrakashManannavar(a)discussions.microsoft.com> wrote in
message news:D7855A81-20EA-4711-AD81-2AF55D27D0B3(a)microsoft.com...
> Thanks guys,
>
> Now I have created WorkItem and queuing it.
>
> In DDK it has been told that "caller of KeWaitForSingleObject can be run
> at
> IRQL <= DISPATCH LEVEL"
>
> I wanted to know that, is there any specific scenarios we can wait there??
>
> --
> ~~~~~
> Prakash A Manannavar,
> Bangalore/Bengaluru.
>
>