pmsystem.cpp

来自「此代码为WCE5.0下电源管理的源代码」· C++ 代码 · 共 46 行

CPP
46
字号
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//

//
// This module contains platform-independent code for handling system power state 
// transitions.
//

#include <pmimpl.h>
#include <nkintr.h>

// This thread initializes the system power state management thread.  The actual
// work of deciding when and how to manage system power state transitions is managed
// in OEM-customizable routines in another module.
DWORD WINAPI 
SystemThreadProc(LPVOID lpvParam)
{
    HANDLE hevReady = (HANDLE) lpvParam;
    INT iPriority;
    SETFNAME(_T("SystemThreadProc"));

    PMLOGMSG(ZONE_INIT, (_T("+%s: thread 0x%08x\r\n"), pszFname, GetCurrentThreadId()));

    // set the thread priority
    if(!GetPMThreadPriority(_T("SystemPriority256"), &iPriority)) {
        iPriority = DEF_SYSTEM_THREAD_PRIORITY;
    }
    CeSetThreadPriority(GetCurrentThread(), iPriority);

    // Call the platform routine to manage system power state transitions
    // and power notifications.  This routine implements a loop that should never
    // return.
    PlatformManageSystemPower(hevReady);

    PMLOGMSG(ZONE_INIT | ZONE_WARN, (_T("-%s: exiting\r\n"), pszFname));
    return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?