CPUEnterIdle Routine

CPUEnterIdle enables interrupts and puts the CPU, or the platform, into a low-power state. When an interrupt occurs it will awaken the system. CPUEnterIdle is invoked with the same dwIdleParam parameter as OEMIdle.

This routine is prototyped as the following code example indicates.

void CPUEnterIdle(DWORD dwIdleParam);

If your platform does not support low-power modes, the implementation can be used as shown in the following code example.

void CPUEnterIdle(DWORD dwIdleParam);
{
  fInterruptFlag = FALSE;
  INTERRUPTS_ON();
  while (!fInterruptFlag) {
  // Just wait here. Any interrupt will bump us out.
  }
}

**Note   **This requires that all interrupt service routines (ISRs) set the variable fInterruptFlag, which must be declared as volatile.

See Also

Boilerplate Interface Routines

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.