+ if (msg & kIOPMOverTemp) {
+ IOLog("Power Management received emergency overtemp signal. Going to sleep.");
+ (void) sleepSystem ();
+ }
+ if (msg & kIOPMSetDesktopMode) {
+ desktopMode = (0 != (msg & kIOPMSetValue));
+ msg &= ~(kIOPMSetDesktopMode | kIOPMSetValue);
+ }
+ if (msg & kIOPMSetACAdaptorConnected) {
+ acAdaptorConnect = (0 != (msg & kIOPMSetValue));
+ msg &= ~(kIOPMSetACAdaptorConnected | kIOPMSetValue);
+ }
+ if (msg & kIOPMEnableClamshell) {
+ ignoringClamshell = false;
+ }
+ if (msg & kIOPMDisableClamshell) {
+ ignoringClamshell = true;
+ }
+
+ if (msg & kIOPMProcessorSpeedChange) {
+ IOService *pmu = waitForService(serviceMatching("ApplePMU"));
+ pmu->callPlatformFunction("prepareForSleep", false, 0, 0, 0, 0);
+ pm_vars->thePlatform->sleepKernel();
+ pmu->callPlatformFunction("recoverFromSleep", false, 0, 0, 0, 0);
+ }
+