BlankHi all,
I have a passive level function (application device I/O Control handler)
this function can not fullfill the user function until the hardware stop
interrupting the driver.
to stop the interrupt, I need to wait tell the last interrupt reach and
handled.
is there any conflicts to wait for an event (in passice level ) to be
signaled from the interrupt service routine DPC?
thanks in advance
Hesham
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
As the NT IO model is basically an asynchronous one, you generally do not
want to wait in a dispatch routine for extended periods of time, and instead
you should mark the IO request pending, queue the IO request, return status
pending, and either perform the required processing in your dpc routine, or
have your dpc routine activate a worker thread to perform the required
operations. On the other hand, generally nothing horrible will happen if you
wait for your event to fire in the dispatch routine.
-----Original Message-----
From: Hesham Desouky [mailto:xxxxx@yahoo.com]
Sent: Tuesday, February 12, 2002 1:32 AM
To: NT Developers Interest List
Subject: [ntdev] ISR routine and Passive level function
BlankHi all,
I have a passive level function (application device I/O
Control handler) this function can not fullfill the user
function until the hardware stop interrupting the driver. to
stop the interrupt, I need to wait tell the last interrupt
reach and handled.
is there any conflicts to wait for an event (in passice level
) to be signaled from the interrupt service routine DPC?
thanks in advance
Hesham
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
thanks for reply
- anyhow about the first solution, I don’t want the application to be aware
about finishing the request.
- about the worker thread I can’t get what you mean?
and is it safe to do wait for event in passive function to be signaled from
the dpc (no weired locks)?
note: the wait in passive level will not take too long (maximum of 40ms)
thanks in advance
Hesham
----- Original Message -----
From: “Roddy, Mark”
To: “NT Developers Interest List”
Sent: Tuesday, February 12, 2002 3:32 PM
Subject: [ntdev] RE: ISR routine and Passive level function
> As the NT IO model is basically an asynchronous one, you generally do not
> want to wait in a dispatch routine for extended periods of time, and
instead
> you should mark the IO request pending, queue the IO request, return
status
> pending, and either perform the required processing in your dpc routine,
or
> have your dpc routine activate a worker thread to perform the required
> operations. On the other hand, generally nothing horrible will happen if
you
> wait for your event to fire in the dispatch routine.
>
> > -----Original Message-----
> > From: Hesham Desouky [mailto:xxxxx@yahoo.com]
> > Sent: Tuesday, February 12, 2002 1:32 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] ISR routine and Passive level function
> >
> >
> > BlankHi all,
> > I have a passive level function (application device I/O
> > Control handler) this function can not fullfill the user
> > function until the hardware stop interrupting the driver. to
> > stop the interrupt, I need to wait tell the last interrupt
> > reach and handled.
> >
> > is there any conflicts to wait for an event (in passice level
> > ) to be signaled from the interrupt service routine DPC?
> >
> > thanks in advance
> >
> > Hesham
> >
> >
> >
> >
> >
> >
> > Do You Yahoo!?
> >
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as:
> > xxxxx@stratus.com To unsubscribe send a blank email to
> > leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
thanks for reply
- anyhow about the first solution, I don’t want the
application to be aware about finishing the request.
It needn’t be. If your application opens the device for synchronous
operations then the IoManager has to deal with the fact that the IRP is
pended, not the application.
In win32 the default mode is synchronous, so your application would not have
to change at all.
- about the worker thread I can’t get what you mean?
1.) See the DDK function IoQueueWorkItem. The kernel keeps a pool of worker
threads that you can borrow to perform tasks. Typically they are used to get
from DISPATCH_LEVEL back to PASSIVE_LEVEL.
2.) Create your own private worker thread using PsCreateSystemThread and
have hang out waiting for work to do.
In your case though, I think your dpc routine that was going to signal an
event can instead just complete the IRP. Your dispatch routine queues the
irp and returns STATUS_PENDING, your dpc routine dequeues the IRP and
completes it. This is a very standard model of IRP processing in NT.
and is it safe to do wait for event in passive function to be
signaled from the dpc (no weired locks)?
It is safe to signal events in your dpc and it is safe to wait on events at
passive level.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com