27 #include <sys/cdefs.h>
30 #include <sys/param.h>
31 #include <sys/systm.h>
34 #include <sys/power.h>
35 #include <sys/taskqueue.h>
45 int state = (intptr_t)arg;
82 if (state != POWER_SLEEP_STATE_STANDBY &&
83 state != POWER_SLEEP_STATE_SUSPEND &&
84 state != POWER_SLEEP_STATE_HIBERNATE)
111 printf(
"system power profile changed to '%s'\n",
112 (state == POWER_PROFILE_PERFORMANCE) ?
113 "performance" :
"economy");
120 EVENTHANDLER_INVOKE(power_profile_change, 0);
static power_pm_fn_t power_pm_fn
void power_pm_suspend(int state)
static void power_pm_deferred_fn(void *arg, int pending)
int power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg)
int power_profile_get_state(void)
void power_profile_set_state(int state)
static u_int power_pm_type
u_int power_pm_get_type(void)
static int power_profile_state
static void * power_pm_arg
static struct task power_pm_task
int printf(const char *fmt,...)
int taskqueue_enqueue(struct taskqueue *queue, struct task *task)