Re: WaitForSingleObject and Sleep never time out

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Well, does it show the same behaviour if you don't
initialize the interrupt? Just comment out InteruptInitialize
call and see if WaitForSingleObject returns with
timeout.


"ScottNichols" <ScottNichols@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6C257653-E38A-40FA-842E-B013DE0F3325@xxxxxxxxxxxxxxxx
After the Sleep you can debug other threads. The thread just stays in the
Slpg, RunBlkd state. It is as if the schedular has no timer running and
never wakes the thread back up.

The exact same problem is with the WaitForSingleObject timeout. The thread
will unblock if an event is signalled but not when it times out.

The problem is in the XSCCardDetectIstThread in the sdcontrol.c. I saw the
Sleep problem XSCInitialize function between the startTick and endtick
capture.

Cheers

"Voidcoder" wrote:

This is really interesting issue! Can you tell us some more details:

What happens with the rest of the system when your Sleep() hangs?
Are you still able to debug other threads?

Where are you calling it from (exact function name in sdcontrol.c)?

"ScottNichols" <ScottNichols@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:12531093-6E73-4B2E-A2BC-950151F2B970@xxxxxxxxxxxxxxxx
Yes - I create the event as follows:
pHardwareContext->hCardInsertInterruptEvent = CreateEvent(NULL, FALSE,
FALSE,NULL);


"Remi de Gravelaine" wrote:

Are you sure you are using an auto-reset event?

Remi








.



Relevant Pages

  • Re: setTimer - what have I missed?
    ... WaitForSingleObject with timeout 10ms is what I've used and that is what ... > SetTimer routine is included in display based devices as part of the GWES ... > Jernej Turnsek ...
    (microsoft.public.windowsce.platbuilder)
  • Re: MFC DLL - ExitInstance hang on WaitForSingleObject
    ... return value of WaitForSingleObject. ... implement the WAIT_TIMEOUT for good programming as Joseph propose? ... // Check for startup event ... If you get this timeout then the thread has not yet started. ...
    (microsoft.public.vc.mfc)
  • Re: Error in schedule.c file
    ... I do have a couple of WaitForSingleObject ... target will reset/halt once that debugchk is hit. ... we can't do much for debug builds with that debugchk in ... a single object, of an interrupt event, with non-infinite timeout. ...
    (microsoft.public.windowsce.embedded)