FreeBSD kernel kern code
subr_power.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/eventhandler.h>
#include <sys/power.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/taskqueue.h>
Include dependency graph for subr_power.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
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)
 
u_int power_pm_get_type (void)
 
void power_pm_suspend (int state)
 
int power_profile_get_state (void)
 
void power_profile_set_state (int state)
 

Variables

static u_int power_pm_type = POWER_PM_TYPE_NONE
 
static power_pm_fn_t power_pm_fn = NULL
 
static void * power_pm_arg = NULL
 
static struct task power_pm_task
 
static int power_profile_state = POWER_PROFILE_PERFORMANCE
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ power_pm_deferred_fn()

static void power_pm_deferred_fn ( void *  arg,
int  pending 
)
static

Definition at line 45 of file subr_power.c.

References power_pm_arg, and power_pm_fn.

Referenced by power_pm_register().

Here is the caller graph for this function:

◆ power_pm_get_type()

u_int power_pm_get_type ( void  )

Definition at line 72 of file subr_power.c.

References power_pm_type.

◆ power_pm_register()

int power_pm_register ( u_int  pm_type,
power_pm_fn_t  pm_fn,
void *  pm_arg 
)

Definition at line 53 of file subr_power.c.

References power_pm_arg, power_pm_deferred_fn(), power_pm_fn, power_pm_task, and power_pm_type.

Here is the call graph for this function:

◆ power_pm_suspend()

void power_pm_suspend ( int  state)

Definition at line 79 of file subr_power.c.

References power_pm_fn, power_pm_task, and taskqueue_enqueue().

Here is the call graph for this function:

◆ power_profile_get_state()

int power_profile_get_state ( void  )

Definition at line 99 of file subr_power.c.

References power_profile_state.

◆ power_profile_set_state()

void power_profile_set_state ( int  state)

Definition at line 105 of file subr_power.c.

References bootverbose, power_profile_state, and printf().

Here is the call graph for this function:

Variable Documentation

◆ power_pm_arg

void* power_pm_arg = NULL
static

Definition at line 41 of file subr_power.c.

Referenced by power_pm_deferred_fn(), and power_pm_register().

◆ power_pm_fn

power_pm_fn_t power_pm_fn = NULL
static

Definition at line 40 of file subr_power.c.

Referenced by power_pm_deferred_fn(), power_pm_register(), and power_pm_suspend().

◆ power_pm_task

struct task power_pm_task
static

Definition at line 42 of file subr_power.c.

Referenced by power_pm_register(), and power_pm_suspend().

◆ power_pm_type

u_int power_pm_type = POWER_PM_TYPE_NONE
static

Definition at line 39 of file subr_power.c.

Referenced by power_pm_get_type(), and power_pm_register().

◆ power_profile_state

int power_profile_state = POWER_PROFILE_PERFORMANCE
static

Definition at line 96 of file subr_power.c.

Referenced by power_profile_get_state(), and power_profile_set_state().