FreeBSD/sys/i386/bios/apm.c
/*
 * Public interface to the suspend/resume:
 *
 * Execute suspend and resume hook before and after sleep, respectively.
 *
 */
Public interface to the suspend/resume:
Execute suspend and resume hook before and after sleep, respectively.
Public interface to the suspend / resume : Execute suspend and resume hook before and after sleep respectively .
void
apm_suspend(int state)
{
	struct apm_softc *sc = &apm_softc;
	if (sc == NULL || sc->initialized == 0)
		return;
	switch (state) {
	case PMST_SUSPEND:
		if (sc->suspends)
			return;
		sc->suspends++;
		sc->suspend_countdown = apm_suspend_delay;
		break;
	case PMST_STANDBY:
		if (sc->standbys)
			return;
		sc->standbys++;
		sc->standby_countdown = apm_standby_delay;
		break;
	default:
		printf("apm_suspend: Unknown Suspend state 0x%x\n", state);
		return;
	}
	apm_op_inprog++;
	apm_lastreq_notify();
}
void apm_suspend ( int state ) { struct apm_softc * sc = & apm_softc ; if ( sc == NULL || sc -> initialized == 0 ) return ; switch ( state ) { case PMST_SUSPEND : if ( sc -> suspends ) return ; sc -> suspends ++ ; sc -> suspend_countdown = apm_suspend_delay ; break ; case PMST_STANDBY : if ( sc -> standbys ) return ; sc -> standbys ++ ; sc -> standby_countdown = apm_standby_delay ; break ; default : printf ( " \n " , state ) ; return ; } apm_op_inprog ++ ; apm_lastreq_notify ( ) ; }
Public interface to the suspend/resume:
 Execute suspend and resume hook before and after sleep, respectively.
Public interface to the suspend / resume : Execute suspend and resume hook before and after sleep respectively .