MOS Source Code
Loading...
Searching...
No Matches
power.h File Reference
#include <stdnoreturn.h>
+ Include dependency graph for power.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* power_callback_t) (void *data)
 

Functions

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.
 

Typedef Documentation

◆ power_callback_t

typedef void(* power_callback_t) (void *data)

Definition at line 6 of file power.h.

Function Documentation

◆ 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: