MOS Source Code
Loading...
Searching...
No Matches
power.c File Reference
+ Include dependency graph for power.c:

Go to the source code of this file.

Classes

struct  power_callback_entry_t
 

Functions

 SLAB_AUTOINIT ("power_callback", power_callback_cache, power_callback_entry_t)
 
void power_register_shutdown_callback (power_callback_t callback, void *data)
 Register a callback to be called when the system is about to shut down.
 
void power_shutdown (void)
 Shutdown the system.
 

Variables

static list_head pm_notifiers = LIST_HEAD_INIT(pm_notifiers)
 
static slab_tpower_callback_cache = NULL
 

Function Documentation

◆ SLAB_AUTOINIT()

SLAB_AUTOINIT ( "power_callback" ,
power_callback_cache ,
power_callback_entry_t  )

◆ power_register_shutdown_callback()

void power_register_shutdown_callback ( power_callback_t callback,
void * data )

Register a callback to be called when the system is about to shut down.

Parameters
callbackThe callback to be called.
dataThe data to be passed to the callback.

Definition at line 24 of file power.c.

+ Here is the call graph for this function:

◆ power_shutdown()

void power_shutdown ( void )

Shutdown the system.

Definition at line 33 of file power.c.

Referenced by MOS_STATIC_ASSERT(), and try_handle_kernel_panics_at().

+ Here is the call graph for this function:

Variable Documentation

◆ pm_notifiers

list_head pm_notifiers = LIST_HEAD_INIT(pm_notifiers)
static

Definition at line 20 of file power.c.

Referenced by power_register_shutdown_callback(), and power_shutdown().

◆ power_callback_cache

slab_t* power_callback_cache = NULL
static

Definition at line 21 of file power.c.

Referenced by power_register_shutdown_callback().