Interactions between OEMIdle and the Thread Timer

The OEMIdle algorithm is complicated by the fact that it must cooperate with the system tick interrupt service routine (ISR) in updating CurMSec. When an interrupt wakes the CPU from its low power mode during OEMIdle, the ISR for the interrupt executes. Once it has executed, control returns to the point in OEMIdle at which the CPU was put to sleep.

If a timer interrupt woke the system, the tick ISR has already updated CurMSec by one millisecond before control returns to OEMIdle. If another interrupt woke the CPU, CurMSec has not been incremented. It is up to OEMIdle to make sure that CurMSec is properly updated regardless of the wakeup interrupt.

The following factors affect both OEMIdle and the system tick ISR:

  • Interrupt latency timing support code
  • Monte Carlo profiling support code
  • Possible support for software-only alarms

See Also

CPU Utilization

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.