DOPOWERHOOKS(9)              OpenBSD Kernel Manual             DOPOWERHOOKS(9)

NAME
     dopowerhooks - run all power hooks

SYNOPSIS
     void
     dopowerhooks(int why);

DESCRIPTION
     The dopowerhooks() function invokes all power hooks established using the
     powerhook_establish(9) function.  Power hooks are called in reverse or-
     der, i.e., the power hook established last will be called first.

     This routine is called from the apm(4) driver when a power change is de-
     tected.  The why argument is one of PWR_SUSPEND, PWR_STANDBY, or
     PWR_RESUME, describing the reason for the change in power state.  Each
     established power hook is passed this information so the appropriate ac-
     tions can be taken.

SEE ALSO
     apm(4), powerhook_establish(9)

OpenBSD 2.8                      July 1, 2000                                1
