Activity timers
- From: "voidcoder" <voidcoder@xxxxxxxxx>
- Date: Mon, 30 May 2005 13:17:46 +0200
Could someone pls tell me why the following code does never
return from the second WaitForSingleObject call !?
HANDLE Active = OpenEvent(EVENT_ALL_ACCESS, FALSE,
TEXT("PowerManager/SystemActivity_Active"));
HANDLE Inactive = OpenEvent(EVENT_ALL_ACCESS, FALSE,
TEXT("PowerManager/SystemActivity_Inactive"));
if (WaitForSingleObject(Inactive, INFINITE) == WAIT_OBJECT_0)
{
if (WaitForSingleObject(Active, INFINITE) == WAIT_OBJECT_0) // <- Stall
forever
{
// Some code
}
}
I'd like to handle Inactive-to-Active transition state using activity
timers but do not understand windows behaviour ... I'm able to
wait for "Inactive" event, howether it stalls inside the second wait for
"Active" event independent from the actual activity on the system.
Any ideas?
Thanks.
.
- Follow-Ups:
- Re: Activity timers
- From: H. Edgar
- Re: Activity timers
- Prev by Date: Re: Is is possible to write a FMD for NAND flash supporting all the NA
- Next by Date: Re: Activity timers
- Previous by thread: PAN Bridging
- Next by thread: Re: Activity timers
- Index(es):