Closing a thread that is waiting for Irq



Hello experts,
My problem:
In a stream device driver a measuring thread starts when the application
calls XXX_IOControl with a specific parameter. The tread waits for an event
(WaitForSingleObject()) which comes from hardware interrupt (created with
InterrruptInitialize). The timeout time is a few seconds.

Another call to XXX_IOControl closes the measuring thread down, it sets a
flag that the thread reads after WaitForSingleObject returns.

The problem is that the thread must close immediately, I do not have time to
wait for an WaitForSingleObject to timeout.

For what I understand it's not wise to use TerminateThread? It also seems
impossible to use WaitForMultipleObjects() when HW Interrupts are involved?
Anyone any Ideas?
(I use Windows CE 4.2 XSCALE platform)
Best regards
Igge

.



Relevant Pages

  • Re: Closing a thread that is waiting for Irq
    ... This will not work because interrupt events can not be used ... >from an IRQ. ... The timeout time is a few seconds. ... >> flag that the thread reads after WaitForSingleObject returns. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Closing a thread that is waiting for Irq
    ... > In a stream device driver a measuring thread starts when the application ... > ) which comes from hardware interrupt (created with ... The timeout time is a few seconds. ... > flag that the thread reads after WaitForSingleObject returns. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Closing a thread that is waiting for Irq
    ... from an IRQ. ... > ) which comes from hardware interrupt (created with ... The timeout time is a few seconds. ... > flag that the thread reads after WaitForSingleObject returns. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How Can I handle more than one interrupt in a device driver?
    ... Did you change to WaitForSingleObject in the two threads? ... beitman AT applieddata DOT net ... Now I must handle with two external interrupt in a device driver. ... I also create two ISTs for each interrupt, but sill fails. ...
    (microsoft.public.windowsce.platbuilder)