コード例 #1
0
ファイル: sink_configmanager.c プロジェクト: NemProjects/BC
/****************************************************************************
NAME 
  	configManagerDefragCheck

DESCRIPTION
  	Defrag PS if required.

RETURNS
  	void
*/
void configManagerDefragCheck(void)
{
    CONF_DEBUG(("CONF: Defrag Check ")) ;
    if(theSink.rundata->defrag.key_size)
    {
        uint16 count = PsFreeCount(theSink.rundata->defrag.key_size);
        CONF_DEBUG(("Enabled [%d] ", count)) ;
        if(count <= theSink.rundata->defrag.key_minimum)
        {
            CONF_DEBUG(("Flooding PS")) ;
            PsFlood();
            /* try to set the same boot mode; this triggers the target to reboot.*/
            BootSetMode(BootGetMode());
        }
    }
    CONF_DEBUG(("\n")) ;
}
コード例 #2
0
/*
NAME
    PsFloodAndReboot

DESCRIPTION
    Process the required actions from HandleRebootToResume.

    Flood PS to force a defrag on next boot, then do a warm reboot.

    Called either immediately or once we receive permission from
    the VM application.
*/
static void PsFloodAndReboot()
{
    PsFlood();
    BootSetMode(BootGetMode());
}