unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OpenBSD-5.7)
Page:
Section:
Apropos / Subsearch:
optional field

DOPOWERHOOKS(9)          BSD Kernel Developer's Manual         DOPOWERHOOKS(9)

NAME
     dopowerhooks -- run all power hooks

SYNOPSIS
     #include <&lt;sys/types.h>&gt;
     #include <&lt;sys/systm.h>&gt;

     void
     dopowerhooks(int why);

DESCRIPTION
     dopowerhooks() calls all power hooks that have been established using
     powerhook_establish(9).  At ``suspend'' and ``standby'' time, power hooks
     are called in reverse order, i.e., the power hook established last will
     be called first.  At ``resume'' time, power hooks are called in order,
     i.e., the power hook established first will be called first.

     dopowerhooks() is invoked by acpi(4) or apm(4) when a power state change
     is detected.  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
     actions can be taken.

SEE ALSO
     acpi(4), apm(4), powerhook_establish(9)

BSD                              June 4, 2013                              BSD