ERROR: Power Handler function yield to low priority thread 解决办法

来源:互联网 发布:蓝博软件升级 编辑:程序博客网 时间:2024/05/16 17:39

ERROR: Power Handler function yield to low priority thread 解决办法(作者:JNU_kinke)

  wince5.0休眠唤醒的时候出现ERROR: Power Handler function yield to low priority thread. 异常

,导致系统唤醒过程很慢。

上网上找一下资料说到:

 
You can't make a system call of any kind in a power handler routine. You

could implement this requirement by making the driver power manager aware

and performing the operation when the PM tells you to change state.

在power handler routine中不能调用系统函数,比如sleep()

     因为很多帖子都提到“power handler routine中不能调用系统函数”,虽然有点肯定就是这个原因,但

是系统这么多驱动不知如何下手,我想到的调试办法就是一个一个驱动试。首先不加载camra驱动,不行;再

不加载backlight驱动,比较幸运,原来就是这个驱动搞得鬼。找到backlight驱动的power_up代码:

BAK_PowerUp(void)
{
  BL_On(TRUE);
 //BL_PowerOn(TRUE);
}

BAK_PowerUp调用了 BL_On, BL_On是背光开关函数,其中调用了注册表函数RegOpenKeyEx。调整了backlight

驱动的程序结构,问题最终得到解决。

 

原创粉丝点击