Re: Closing a thread that is waiting for Irq
- From: "Charles Peterson" <charlie@xxxxxxxxxx>
- Date: Wed, 29 Jun 2005 09:02:31 +0200
Call CloseHandle() on the event. This will cause WaitForSingleObject
to return WAIT_FAILED immedeately.
"Igge H" <IggeH@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:782083F8-FE2F-43E7-A0F6-96C9FB652C07@xxxxxxxxxxxxxxxx
> 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
>
.
- References:
- Closing a thread that is waiting for Irq
- From: Igge H
- Closing a thread that is waiting for Irq
- Prev by Date: Re: Mapping physical memory into Application space
- Next by Date: Re: which function should I use if I want to write sth into a file?
- Previous by thread: Closing a thread that is waiting for Irq
- Next by thread: Re: Closing a thread that is waiting for Irq
- Index(es):
Relevant Pages
|
|